Hello All,
A friend of mine told me that it is possible to even create games with PHP.
Is that really possible?
Can we implement artificial intelligence using PHP?
Looking for your ideas.
Thanks
Hello All,
A friend of mine told me that it is possible to even create games with PHP.
Is that really possible?
Can we implement artificial intelligence using PHP?
Looking for your ideas.
Thanks
Yes, PHP is Turing complete, so in theory you can create any kind of application you desire. It doesn't mean you should, though, and there are far more suitable tools out there.
While it is possible to implement Artificial Intelligence and Games in PHP it's not optimal to do so. PHP's main design is targeted at effective Server Side web programming and as such isn't the most optimal platform to be developing Artificial Intelligence and Games on.
That said, it also depends on how you define AI, if you mean games that have AI again, it's possible but not optimal.
Programming languages are a way to express a concept, different languages are better at expressing different types of concepts. For PHP it's very good at expressing online server side scripting concepts, however it is less suited to expressing concepts like Video Games compared to more general languages such as C, C++, Java, C#, etc... (There are far more, this is just a shortlist)
If you really want online games you should consider Java which has excellent web integration while providing a better medium for creating games.
I think php is good for creating browser games because php is meant to run at a server and generating output pages (xml, html, etc.)
If you like to create something else then a game where the logic runs on a webserver it would be more clever and more easy to chose a language that was designed to such things.