3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function fn(&$val, $qty, $year) { $res = $val; if ($val > 70) $res -= 2; if ($qty > 120) $res -= 1; if ($year > 2007) $res -= 4; return $res; } $a = 72; var_dump(fn(&$a,10,10)); var_dump($a);
Output for 5.4.0 - 5.4.22
Fatal error: Call-time pass-by-reference has been removed in /in/1QrJ3 on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/1QrJ3 on line 11 int(70) int(72)