PHP: the language you love to hate

  • PHP
  • Rant

I love PHP

I love PHP. Seriously.

I love that it's easy, and yet so powerfull.

I love that variables are not strictly typed.

I love all the great frameworks and products that exist in PHP.

I love that you can so easily deploy your code.

I love that making web applications is just a breeze.

I love that PHP gives you the choice between OO and procedural style programming.

I love PHP arrays' [] push syntax (I just miss it when writing Javascript...).

I love PHP's associative arrays.

I love PHP's incredibly rich API for doing just about anything (from SOAP to dog-training: it's all there).

I love PHP's incredibly rich documentation.

I love that PHP is so cheap to develop for. Got an idea (a new Instapapper, tadalist, etc), just for fun ? Get a cheap 20$/year hosting package, spend a few nights and weekends and bingo ! You're live ! Try that with other languages that require expensive, dedicated hosting...

I love PHP...

I hate PHP

I hate PHP. Seriously.

I hate that it's so incredibly bloated with unnecessary functionality.

I hate that for some functions / language constructs, there are like 20 aliases available.

foreach (array(
    'string', 'array', 'soap', 'curl', 'xml', 'file', 'regex', '?]#@"',
  ) as $language_construct) {

  echo sprintf("I hate the fact that the %s API is so inconsistent.", $language_construct);


I hate that there are so many irrelevant products and frameworks out there*.

I hate that you have 10 ways to do the exact same thing (ever used split vs explode ?), but not all having the same impact on performance.

I hate that 50% of the comments on the documentation pages are just dumb and irrelevant.

I hate the obscure error messages (T_PAAMAYIM_NEKUDOTAYIM what ?!?).

I hate that PHP tries to be always backward-compatible. (I mean: what the heck ??)

I hate PHP...

* hey, by the way: check out my own framework here... OMG ! I'm a PHP developper with his own framework ! What will my mum say ?

Enjoyed this post? Grab the RSS feed or follow me on Twitter!

Found a typo ? Correct it, submit a pull-request and get credited here!