Why do Python programmers hate PHP?
I saw a colleague answer this question and thought I’d give a go:
From a software language design perspective, the PHP language is an ugly hack. One of the creators of Java said that when he thinks of PHP his heart goes dark (showing a complete black slide in his presentation for emphasis). The more structured the language (and Java and Python certainly are), the more offensive this ugliness is. (Ruby gets this view not from the language but for being the home of a lot of programmers who were trained in Java in school and for Ruby on Rails being a popular framework in the webspace already crowded out by PHP.)
However, there are t-shirts out there of me saying back in 2006, “PHP is a ball of nails, but when you throw it at a wall, it sticks” and that still applies today—it’s ugly, true; but it works. If anything, the language is far more ubiquitous on the web now than then, though that’s mostly due to the popularity of applications written in PHP such as WordPress and Facebook rather than any success in the language itself. The language has proved remarkably successful due to its adaptability and limited focus on what problems it tries to solve.
I imagine that this popularity-in-spite-of-aesthetic-beauty is offensive to those working in the web who think themselves above the direct, simple, and crass. That reality may sit so ill with some people that they feel the need to disparage PHP which becomes an object of their derision and the villain in their story. It’s only natural for a cohort in the minority to feel that way toward a market leader: Apple Macintosh users used to act like that toward Windows PCs, Windows Phone users act this way toward iOS and Android, etc.
The irony is that PHP is a market leader in only one tiny aspect of the programming market: the server-side, non-event-driven web. It has no footprint in the client-side web, none in application space or even the mobile app space, no recognized products in non-web tools and applications; and is just a rounding error in the DevOps space (to pick just one area where Python seems dominant/ascendant). It even makes no pretension to be a programming language to facilitate learning programming (another area Python is better suited to). Since all these areas are growing as the niche PHP represents is static, I find it ironic people still wage language-religious jihad against PHP.
That’s like hating on a horseshoe monopoly after the automobile has been invented.
And I say this as someone who has programmed PHP for 16 years and gives keynote speeches in the language.
4 thoughts on “Why do Python programmers hate PHP?”
$its $something $with $the $syntax $bitch
PHP is money. What’s wrong with that? Every time I program PHP I see dollar signs. Sounds like a good thing.
Failures do not have enemies; when you are successful, you have loads of enemies and that is the case with PHP. If facebook,wordpress and other important apps are powered by PHP, hating it is nothing but jealousy. PHP has really matured with the integration of OOP and can do so many things easily than the almighty java and python. It has really come to stay.
I hated php when i was beginner in it. I loved python when i was beginner in it. Now its completely opposite. Python works great for <100 lines single file scripts. I am really really sad about fact that it has tools i need and cant find elsewhere so i am forced to use it from time to time.