3v4l.org

run code in 300+ PHP versions simultaneously
<?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;

preferences:
39 ms | 402 KiB | 5 Q