What? You can't make PHP calls from JS or HTML. In order for you to use PHP in a web page, you need to have the browser request another page from the web server. Which is just as fast as any networking DLL.
you can include stuff like JS in normal HTML, along with PHP
I can see why you might want to call JS functions from within a game. Nice suggestion.