Fix #62200: __set_state() not implemented

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339526 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2016-06-29 17:03:32 +00:00
parent 9a8ee04fdf
commit ec77057bf3

View file

@ -288,6 +288,19 @@ object(A)#2 (2) {
]]>
</screen>
</example>
<note>
<simpara>
When exporting an object, <function>var_export</function> does not check
whether <link linkend="object.set-state">__set_state()</link> is
implemented by the object's class, so re-importing such objects will fail,
if __set_state() is not implemented. Particularly, this affects some
internal classes.
</simpara>
<simpara>
It is the responsibility of the programmer to verify that only objects will
be re-imported, whose class implements __set_state().
</simpara>
</note>
</sect2>
<sect2 xml:id="language.oop5.magic.debuginfo">