|
|
|
|
|
by edsrzf
1158 days ago
|
|
The world that PHP grew up in has changed. The language and community have matured, and in the process PHP has lost most of its competitive advantage: low barrier to entry. It used to be: * Moving from static HTML to dynamic server code was a matter of changing file extension and adding PHP tags.
* Many shared hosting services supported PHP.
* Deploying was a matter of copying files to the server.
Projects that started from HTML + PHP tags grew and became unmaintainable messes. The PHP community learned from this and evolved in a different direction. You can still _write_ PHP code in the old way, but it's strongly discouraged and (rightfully) seen as a bad practice. You don't even use PHP as a templating language anymore. Symfony and Laravel have their own templating languages that dynamically compile to PHP.Modern PHP code looks very much like Java or C# -- classes, OO design patterns, and so on. Except in most ways, it's worse than Java or C#. Why would anyone start a new project in PHP? Deploy models have also changed. You're usually not copying files to servers, but deploying Docker images or other formats. PHP has no particular advantage in this new world. If PHP wants to turn things around, it needs to figure out what makes it unique or better than other languages. Right now, there's really nothing. |
|
First of all, php is faster than python, and ruby and probably most dynamic languages except JavaScript.
So in terms of performance, modern php is ahead of the other languages and it scales well.
Regarding features, php has the best support for classes and types out of the three languages. So if you want to design a classic oo system, php has the best features language-wise.
Php also has a great community (good ides, good package manager, good open source libraries and frameworks).
What do other languages offer that php doesn’t have?