Index ¦ Archives ¦ Atom > Tag: languages that suck

wtf php

Here are some things that I hate about PHP:

Non-default arguments are allowed after default arguments, but there’s no way to use them.

<?php

 function printabc($a, $b="2", $c) {
     print_r(array('a'=>$a, 'b'=>$b, 'c'=>$c));
 }

 printabc(1,2,3); // normal case

 printabc(4);  // a=>4, b …

© Chad Selph. Built using Pelican. Theme by Giulio Fidente on github.