Well, you need to understand PHP vs Java or Javascript! They are totally two different worlds!
First, you must remember you are discussing two different things. A “CLIENT-SIDE” and a “SERVER-SIDE” systems.
The server runs PHP and other languages. It does NOT run Javascript as that would give everyone full access to your
server’s system and all it’s data. When you process a PHP file, it is done on the server which protects that code from
the world of hackers. Once it is completed, it’s “OUTPUT” is combined with your HTML and sent to the browser. You never
see any PHP code in any webpage on the world. RIGHT-CLICK on ANY page in the world and you can view all of their
HTML code, their CSS code and unprotected Javascript. You also can see lists of the external files they use such as any
external CSS files used. These can be downloaded. But, you will never see any of their PHP code unless it is listed in
their webpage as text. (Such as you do here!)
Next, the client side of the process is really your “BROWSER” or an app that uses an embedded browser. Therefore, as
you mostly likely now understand, this coding is done on the local computer that is being used to view a webpage. And,
this means it can communicate with a server, but, has no control over the server itself. This is for security issues as you
can now understand. I use Unity and love it. The engine has a lot of controls and things that need to be controlled in the
client-end of the system. Therefore, Javascript is used. This of course can pull data from the server by calling PHP pages
which can access the server’s database, etc and then send data back as .JSON formats or whatever is needed. But, it does
not have full access to the server.
So, in my opinion, ANYTHING, or perhaps, EVERYTHING, is possible in programming. But, security makes the PHP end of
it all locked into the server. This protects you from the crazies in the world! Now, if you are looking for a project for your PHP
skills, that is another subject all together… I have millions and never seem to get to any of them. LOL
Well, hope that made sense to you. Yes, you can do Unity type of coding with PHP, but, it is not really a gaming engine as it
can not do anything on the client-side! But, that is what Unity’s browser plug-in does.
See you in the 'Bitstream… (That is all this really is… LOL)