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 null; } function asdf($a) { var_dump($a); } set_error_handler("my_errorhandler"); asdf($my_var[0]->errormsg = "xyz"); ?>
based on rYJUi
Output for 5.3.7 - 7.1.0
EROOR: Creating default object from empty value NULL
Output for 5.3.0 - 5.3.6
EROOR: Creating default object from empty value
Process exited with code 139.
Output for 5.0.0 - 5.2.17
EROOR: Creating default object from empty value string(3) "xyz"
Output for 4.3.0 - 4.4.9
string(3) "xyz"