20 possible reasons why PHP function names and parameters are weird

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:

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

15 thoughts on “20 possible reasons why PHP function names and parameters are weird”

  1. Sorry for my bad english.

    I remember a thread in a coder-board, some years ago. The guy said “Now that PHP is well used by the John Does, we have to work for make the language more hard to fully understand, for they need us for that”.

  2. I was hoping to find some tips on how best to name a function using the least number of characters and avoid conflicting with future reserved words.

    The reason I want to do this is so users of my software can enter snippets of PHP into their web pages that call one of my functions that inserts some code into their page.

    The shorter and easier it is to type the better.

    burp() seems to be suitable.

    Andy

  3. Love your site! The minimalist feel is great, but I feel I can’t find anything. Is there any way to search/browse your site aside from recent & archives? Reddit & popular posts help, oh, tags! Finally by topic! Oh, never mind, it’s blank.

    Contact via comments was the only way I found possible.

    You seem like a prominent person, but Roshambo.org just had a landing page of “paper,” and I have to say, the domain name is extremely colloquial! Lol. Do you have a “main site” anywhere?

    Sorry, I just feel like I landed on a gold mine, but all the tunnels are going toward the iron and ore. Thanks for what little I could glean though! :-)

Leave a Reply

Your email address will not be published. Required fields are marked *