我的问题是:
>是否有关于不同PHP版本中序列化/反序列化使用的不同编码的规范? (在我的Google搜索或PHP.net上的文档中找不到任何具体的内容)
>如何将序列化数据从PHP 5.3编码转换为PHP 5.6编码?
我的问题是:
>是否有关于不同PHP版本中序列化/反序列化使用的不同编码的规范? (在我的Google搜索或PHP.net上的文档中找不到任何具体的内容)
>如何将序列化数据从PHP 5.3编码转换为PHP 5.6编码?
在PHP unserialize manual中有一个含糊的提示:
5.6.0 Manipulating the serialised data by replacing C: with O: to force object instantiation without calling the constructor will now
fail.
然而,看看错误列表显示report 68099还有更多内容.它还声明原始格式没有官方文档:
“the original behavior (that we allow the old serialize format to be
used for classes using the new format) was never documented nor
officially supported,”
请注意,该讨论的最终结果是“无法修复”.
所以基本上,你的选择是:
>尝试使用其他序列化程序之一作为在PHP版本之间导出数据的方法.如session_encode也可以处理对象.
>转换脚本.有一个广泛记录的版本
@L_502_6@上的当前格式,您可以使用它旧格式上的迭代器更新语法.