3v4l.org

run code in 300+ PHP versions simultaneously
<?php function t35_handler_MOO($no, $msg){ echo __LINE__.__METHOD__."\n"; restore_error_handler(); echo __LINE__.__METHOD__."\n"; } function t35_handler($no, $msg){ echo __LINE__.__METHOD__."\n"; restore_error_handler(); echo __LINE__.__METHOD__."\n"; } function t35(){ set_error_handler("t35_handler_MOO"); echo "old handler=".set_error_handler("t35_handler")."\n"; trigger_error("error1"); //echo "old handler=".set_error_handler("t35_handler")."\n"; trigger_error("error2"); } t35(); ?>

preferences:
38.37 ms | 402 KiB | 5 Q