3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function my_errorhandler($errno,$errormsg) { global $my_var; $my_var = 0; echo "EROOR: $errormsg\n"; } $my_var = str_repeat("A",$my_var[0]->errormsg = "xyz"); echo "ok\n"; ?>
based on Ol2dS
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: Creating default object from empty value in /in/Ic65v on line 8 Warning: str_repeat() expects parameter 2 to be integer, string given in /in/Ic65v on line 8 ok
Output for 5.4.0 - 5.6.28
Warning: Creating default object from empty value in /in/Ic65v on line 8 Warning: str_repeat() expects parameter 2 to be long, string given in /in/Ic65v on line 8 ok
Output for 5.3.0 - 5.3.29
Strict Standards: Creating default object from empty value in /in/Ic65v on line 8 Warning: str_repeat() expects parameter 2 to be long, string given in /in/Ic65v on line 8 ok
Output for 5.0.0 - 5.2.17
Strict Standards: Creating default object from empty value in /in/Ic65v on line 8 ok
Output for 4.3.0 - 4.4.9
ok