- unserialize: documentation ( source)
- serialize: documentation ( source)
<?php
class Test{
function x(){
print 'asd';
}
private function y(){}
function __construct(){
$test = 'y';
if($this->$test() === TRUE){
echo 12345;
}
}
}
$x = new Test();
$x->y = 'asd';
echo serialize($x);
unserialize(serialize($x));