PHP is Dead

A living memorial to a dying language

Days since declared dead: 5,024
Meanwhile, 77% of the web still runs PHP... PHP stands for 'PHP: Hypertext Preprocessor' which stands for 'PHP: Hypertext Preprocessor: Hypertext Preprocessor'... WordPress alone powers 43% of the internet. Yes, that's PHP. PHP was originally called 'Personal Home Page Tools.' Peak 1995. In PHP, 'T_PAAMAYIM_NEKUDOTAYIM' is the error for '::'. It's Hebrew. Because why not. PHP has both array_key_exists() and in_array(), and they take arguments in opposite orders. The PHP elephant mascot is called 'elePHPant.' They were proud of that. MySQL_real_escape_string exists because mysql_escape_string wasn't escaping things... for real.
← Back to the graveyard

Why does PHP have 67 different string functions with inconsistent naming?

D
dev_frustrated +890

Why does PHP have str_replace, strpos, substr, str_pad, str_repeat... but then strlen, strcmp, strstr? WHO DECIDED THIS?

P
php_historian +1200

Fun fact: the naming convention was based on which C function it was wrapping. Consistency was never the goal. Shipping was the goal.

S
senior_dev_42 +2100

The real fun is when you discover that array_key_exists() and in_array() have their needle/haystack arguments in OPPOSITE ORDERS.

I
intern_pain +670

I just spent 3 hours debugging because I used strpos() and forgot it returns 0 for position 0 which is falsy. I hate it here.

8,900 pts Source: manual
View original →