Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I always thought it was because basic PHP was so intuitive for anyone familiar with a C-like language.


There's a ton of reasons PHP took off, including off the top of my head

- cruftyness of perl

- good timing, few alternatives (C and Perl basically) at a key point in the growth of the internet and web developers.

- very easy migration from a static only site

- easy to deploy, leading to...

- wide availability of PHP shared hosting

- in depth docs

- commenting on docs (cut-and-paste programming ;))

- thousands of builtin functions: first real batteries-included language

- recognizable syntax (esp vs Perl) for Java/C programmers

- not awful performance

- builtin MySQL support from an early stage

- oh, it was free (and also Free)

- dynamic typing

- weak typing (as in, values coerced to other types easily, I know this isn't a real term)


> - commenting on docs (cut-and-paste programming ;))

Very true and rarely mentioned. PHP docs never had the fancy wiki/social/javadoc features you see in many languages, just a primitive comments system - and it was perfect.

When you were picking it up back when "PHP3" yielded 0 results in Amazon (and we had to change the oil on our desktops every week) the docs were your bible, not merely in the sense of occasionally contradicted themselves but also in having examples, Q&A and recipes for common tasks posted by your peers in the comments, much faster than doc writers could catch up with the language's growth.


> good timing, few alternatives (C and Perl basically) at a key point in the growth of the internet and web developers.

Two web language competitors to add here: MS .ASP and ColdFusion. PHP broke out by being both free and Free (the REPL helped too).




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

Search: