PHP手册中从5.5升级到5.6 unserialize的变更是这样写的:
unserialize() will now fail if passed serialised data that has been manipulated to attempt to instantiate an object without calling its constructor.
英文比较差想知道是什么意思,传入的数据是序列化过的没有调用过constructor的对象?
我度过这样的代码,但没报错:
class A{
}
$reClass = new ReflectionClass('A');
$b = $reClass->newInstanceWithoutConstructor();
echo '<pre>';
print_r(unserialize(serialize($reClass)));
die;
哈士奇WWW