Пример #1
0
function test()
{
    $x = new X();
    $x->set();
    $s = serialize($x);
    $y = unserialize($s);
    $y->foo();
    var_dump($y);
}