3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function func(&$val) { return $val ? isset($val) ? $val : 123; } $a1 = array(); $val = func($a1['x']); var_dump($val); // int(123) $a2 = array('x' => 987); $val = func($a2['x']); var_dump($val); // int(987)
Output for 5.3.0 - 5.4.17
Parse error: syntax error, unexpected ';' in /in/E10jq on line 4
Process exited with code 255.