3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class cm404 { public $str = ''; function init() { if (isset($GLOBALS['ryat'])) { exit('hi'); } unset($GLOBALS['hi']); } function __destruct() { global $obj; var_dump($obj); if(!is_object($obj)) { $obj = new cm404(); } echo "hi, $GLOBALS[hi]\n"; var_dump($obj); } } function _get() { // var_dump($obj); } //$ryat = 1; $hi = 'ryat'; $obj = new cm404(); $obj->init(); $hi = 'cm404'; register_shutdown_function(phpinfo()); new class1;
Output for 7.0.0 - 7.1.0
Warning: phpinfo() has been disabled for security reasons in /in/8HBHG on line 34 Warning: register_shutdown_function(): Invalid shutdown callback '' passed in /in/8HBHG on line 34 Fatal error: Uncaught Error: Class 'class1' not found in /in/8HBHG:35 Stack trace: #0 {main} thrown in /in/8HBHG on line 35
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Warning: phpinfo() has been disabled for security reasons in /in/8HBHG on line 34 Warning: register_shutdown_function(): Invalid shutdown callback '' passed in /in/8HBHG on line 34 Fatal error: Class 'class1' not found in /in/8HBHG on line 35
Process exited with code 255.