3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function t35_handler($no, $msg){ echo __LINE__.__METHOD__."\n"; restore_error_handler(); echo __LINE__.__METHOD__."\n"; } function t35(){ echo "old handler=".set_error_handler("t35_handler")."\n"; trigger_error("error1"); echo "old handler=".set_error_handler("t35_handler")."\n"; trigger_error("error2"); } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0