svn: /phpdoc/en/trunk/reference/var/functions/ var-export.xml
| From: | Christoph Michael Becker | Date: | Wed, 09 Sep 2015 14:12:19 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/var/functions/ var-export.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13728@lists.php.net to get a copy of this message | ||
cmb Wed, 09 Sep 2015 14:12:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337793
Log:
documented necessity that __set_state() must be implemented to re-eval var_export()ed code (fixes
#67918)
Bug: https://bugs.php.net/67918 (Verified) var_export does
not export a parsable string representation of stdClass objects
Changed paths:
U phpdoc/en/trunk/reference/var/functions/var-export.xml
Modified: phpdoc/en/trunk/reference/var/functions/var-export.xml
===================================================================
--- phpdoc/en/trunk/reference/var/functions/var-export.xml 2015-09-09 13:17:07 UTC (rev 337792)
+++ phpdoc/en/trunk/reference/var/functions/var-export.xml 2015-09-09 14:12:19 UTC (rev 337793)
@@ -224,6 +224,14 @@
When <function>var_export</function> exports objects, the leading backslash is not
included in the class name of namespaced classes for maximum compatibility.
</para>
</warning>
+ <note>
+ <para>
+ To be able to evaluate the PHP generated by <function>var_export</function>,
+ all processed objects must implement the magic <link
+ linkend="object.set-state">__set_state</link> method. Note that StdClass
+ does not implement __set_state().
+ </para>
+ </note>
</refsect1>
<refsect1 role="seealso">