3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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(); ?>

Abusive script

This script was stopped while abusing our resources

Output for 5.0.5 - 5.6.25, 7.0.0 - 7.0.10
old handler=t35_handler_MOO 10t35_handler 12t35_handler 4t35_handler_MOO 6t35_handler_MOO
Output for hhvm-3.10.0 - 3.12.0

Process exited with code 137.
Output for 5.0.0 - 5.0.4
old handler=t35_handler_MOO 10t35_handler 12t35_handler 10t35_handler 12t35_handler
Output for 4.4.0 - 4.4.9
old handler=t35_handler_MOO Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 10 10__METHOD__ Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 4 4__METHOD__ Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 6 6__METHOD__ 12__METHOD__ Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 4 4__METHOD__ Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 6 6__METHOD__
Output for 4.3.0 - 4.3.11
old handler=t35_handler_MOO Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 10 10__METHOD__ Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 4 4__METHOD__ Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 6 6__METHOD__ 12__METHOD__ Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 10 10__METHOD__ Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/J8npY on line 12 12__METHOD__