3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function doit($v) { var_dump($v); switch ($v) { case 0: echo "zero"; break; case null: echo "null"; break; case false: echo "false"; break; case '': echo "''"; break; } echo "\n\n"; } foreach (array(0, null, false, '', 'a')] as $v) doit($v);
Output for 5.3.0 - 5.4.30
Parse error: syntax error, unexpected ']' in /in/cRljH on line 14
Process exited with code 255.