21,887
社区成员
发帖
与我相关
我的任务
分享
class T {
var $v = 1;
function see() {
echo $this->v;
}
}
$p = new T;
$p->v = 'abcd';
$p->see(); //abcd
$s = json_encode($p);
$t = json_decode($s);
$t->see();//Call to undefined method stdClass::see()
$s = serialize($p);
$t = unserialize($s);
$t->see(); //abcd