3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function func(&$val) { return 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 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
int(123) int(987)
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/ejXTV on line 13
Process exited with code 255.