- var_dump: documentation ( source)
- register_shutdown_function: documentation ( source)
- phpinfo: documentation ( source)
<?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;