Tell HN: We need PHP as a browser script language

3 points by xkcd1963 ↗ HN
Prove me wrong

6 comments

[ 3.6 ms ] story [ 24.8 ms ] thread
“want”, not “need”. What can you do with front end PHP that you can’t do with Javascript? If you wanted to write client-side PHP you are going to compile it to Javascript or WebAssembly anyway.
The idea would be to build the equivalents of JS and WA in PHP for client-side
Presumably you have reasons for wanting to use PHP in the browser.

Are any of them specific to PHP, or do they boil down to “We use PHP in our backend, so we want to use PHP in our front end as well”? The latter would apply to any other language people use on the backend.

I's like to hear some arguments pro-PHP-in-browser first.
The older I am the more I think we do not need any scripting language in the browser.