- file_get_contents: documentation ( source)
- serialize: documentation ( source)
<?php
class T
{
private $allowed22 = 1;
private $allowed = 0;
function __destruct() { if ($this->allowed == 1) echo file_get_contents("key.php"); }
}
$g = new T();
$res = serialize($g);
echo $res;