> What is the PHP equivalent of writing your front end and back end in the same language so you can share libraries and data and not have to switch gears between two different languages each time you look up or down the stack?
You can simply compile your PHP code to wasm with emscripten, and then run it in the browser. Pretty straightforward. No more switching gears.