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; } set_error_handler("my_errorhandler"); $my_var = str_repeat("A","asdf"); var_dump($my_var); ?>
based on SRfdm
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
EROOR: str_repeat() expects parameter 2 to be integer, string given NULL
Output for 5.3.0 - 5.6.28
EROOR: str_repeat() expects parameter 2 to be long, string given NULL
Output for 4.3.0 - 5.2.17
string(0) ""