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 Comments to “20 possible reasons why PHP function names and parameters are weird”

  1. Ambush Commander 29 May 2007 at 00:40 #

    Amusing list. I laughed for a few of them, and no doubt there’s a bit of truth in each item on that list.

  2. Emil Tamas 29 May 2007 at 01:09 #

    sounds like a light description for PERL :)

  3. Brian Moon 29 May 2007 at 01:35 #

    Good. Very good. Most people will never understand the first one in your list. It is the most common reason PHP is the way that it is.

  4. Sara Golemon 29 May 2007 at 06:39 #

    Hah! “Pull Strings” Is that your code-speak for payoffs from the manual cartel?

    Is it? O Capo di tutti capi?

    ((Geez, I hope that’s glue…..))

  5. D.Durand 29 May 2007 at 16:08 #

    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”.

  6. chels75 31 May 2007 at 12:11 #

    maybe in PHP6… lol

  7. Mac 12 February 2008 at 17:32 #

    lol… but I am more confused now :( I was finding way to go with PHP or ASP.NET

  8. Andy 14 March 2008 at 13:27 #

    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.


  9. nerpi 20 February 2009 at 19:57 #

    well at least the names are easy to goddamn type without ridicujlous prefixes or stupid::colons

  10. Cristiano 7 September 2010 at 12:59 #


  11. Mokalino 13 October 2010 at 08:02 #

    And still you run your blog on PHP :D :D

  12. Ben 28 January 2011 at 14:39 #

    Very cool story bro !

    Seriously, everytime I get into the PHP documentation I’m like “wtf?”

  13. […] http://blog.roshambo.org/20-possible-reasons-why-php-function-names-and-parameters-are-weird/ […]

  14. David 23 February 2011 at 06:42 #

    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! :-)

  15. Synthia Appleman 10 March 2011 at 21:35 #

    Many people tend to look at programming styles and languages like religions: if you belong to one, you cannot belong to others. But this analogy is another fallacy.

Leave a Reply