3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function handler($errno, $errstr) { var_dump($errno); } set_error_handler('handler', ~0); function test($string) { $string = 'bar'; } $a = 'foo'; $val = 'test'; eval($val.'(&$a);'); var_dump(error_get_last());
Output for 7.0.0 - 7.1.0
Parse error: syntax error, unexpected '&' in /in/5Dpp2(12) : eval()'d code on line 1
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of test(). in /in/5Dpp2(12) : eval()'d code on line 1
Process exited with code 255.
Output for 5.2.0 - 5.3.29
NULL
Output for 5.0.0 - 5.1.6
<br /> <b>Fatal error</b>: Call to undefined function error_get_last() in <b>/in/5Dpp2</b> on line <b>13</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<br /> <b>Warning</b>: Wrong parameter count for set_error_handler() in <b>/in/5Dpp2</b> on line <b>5</b><br /> <br /> <b>Fatal error</b>: Call to undefined function: error_get_last() in <b>/in/5Dpp2</b> on line <b>13</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Warning</b>: Wrong parameter count for set_error_handler() in <b>/in/5Dpp2</b> on line <b>5</b><br /> <br /> <b>Fatal error</b>: Call to undefined function: error_get_last() in <b>/in/5Dpp2</b> on line <b>13</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: Wrong parameter count for set_error_handler() in <b>/in/5Dpp2</b> on line <b>5</b><br /> <br /> <b>Fatal error</b>: Call to undefined function: error_get_last() in <b>/in/5Dpp2</b> on line <b>13</b><br />