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"; return false; } set_error_handler("my_errorhandler"); $my_var = str_repeat("A",$my_var[0]->errormsg = "xyz"); echo "ok\n"; ?>
based on Od3Do
Output for 5.4.0 - 7.1.0
EROOR: Creating default object from empty value Warning: Creating default object from empty value in /in/U57mb on line 9 ok
Output for 5.0.0 - 5.2.17, 5.3.7 - 5.3.29
EROOR: Creating default object from empty value Strict Standards: Creating default object from empty value in /in/U57mb on line 9 ok
Output for 5.3.0 - 5.3.6
EROOR: Creating default object from empty value Strict Standards: Creating default object from empty value in /in/U57mb on line 9
Process exited with code 139.
Output for 4.3.0 - 4.4.9
ok