Hacker News new | past | comments | ask | show | jobs | submit login

Yes. PHP sucks. So why has it been so successful?

Maybe that's what all these other "amazing" languages need to be asking (instead of pointing at all of PHP's flaws).

My current working theory: PHP.net has the most amazing set of contextual user comments for function reference. PHP.net was stack overflow before stack overflow existed. Yes, PHP has a ton of flaws, but there are workarounds for a lot of those flaws, and those workarounds are often found in a comment right there next to the function.




Does anyone know of articles attempting to explain the huge success of PHP?

My first guess would be a combination of (1) making simple things easy -- by the time you start experiencing the warts and flaws, you've already been successful, and willing to work around them. And (2) (later on) ubiquitous availability on web hosters, giving it a much lower barrier to entry than other languages in the web space.

Other aspects could be a community that's welcoming to novices and autodidacts, or its integration into a "default" infrastructure (Apache, MySQL).

But it would be interesting if some aspects of the languages design itself could be shown to have contributed. Perhaps the mixing of HTML and imperative code? Not having (at first) object orientation? Could its unorthodox semantics for passing by value/reference have been helpful to beginners?

Getting a handle on such design issues for programming languages could be helpful in trying to come up with "better" languages that could be accessible to beginners and end-user programmers, and PHP is an interesting case here.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: