Here are 20 possible reasons why PHP functions lack consistent names and parameters. Learning the definition for every PHP function is truly an amazing feat and I doubt this has been attempted or accomplished by anyone. At least, by any sane human. And references are named references because they are designed to be referenced, right?
The List:
- PHP glues APIs and humans together, and sometimes this gets messy
- PHP documenters pull strings to force a dedicated audience
- PHP is gearing up for a massive quiz on every function signature to rival all pi (π) competitions
- PHP likes BC
- PHP thrives on making your life difficult… because it’s fun
- PHP is working on a time machine so really none of this matters
- PHP gladly and openly steals ideas and usage from other languages
- PHP says all your namespace are belong to us
- PHP functions have been developed under many circumstances, sometimes drunk
- PHP is a recursive acronym
- PHP anarchy says rules? we don’t need no stinkin’ rules!
- PHP function naming algorithm still remains a secret and cannot be cracked
- PHP chose to give people something fun to complain/blog/laugh about
- PHP function aliases are for the weak
- PHP functions created in the 90’s (and some later) directly used prototypes from low-level APIs
- PHP isn’t designed to win a beauty contest
- PHP has other problems to solve
- PHP needed a way to explain having an elephant for a logo
- PHP encourages text editors to be intelligent => code insight
- PHP.net + Ads = $$$
Related Resources:
- CODING_STANDARDS history (1998-1999) and (1999-present) and (view current)
- Rasmus article “Do You PHP?“, see section titled “The Ugly Duckling of Programming Languages”
Related Quiz Questions:
- Write the prototype for: in_array, isset, empty, strpos, strstr, subtr, implode
- Find the aliases: die, exit, echo, print, mysql, strchr, strstr, implode
- Locate the functions: die, echo, print, include, isset, unset, array, rtfm, str_parse, implode
- Define these PHP terms: Deprecated, Minor release, Major release, PECL, TSRM, Open Source, Rules