diff --git a/language/oop5/magic.xml b/language/oop5/magic.xml
index 96bc0fe345..4b33229168 100644
--- a/language/oop5/magic.xml
+++ b/language/oop5/magic.xml
@@ -1,5 +1,5 @@
-
+
Magic Methods
@@ -16,6 +16,7 @@
__sleep,
__wakeup,
__toString,
+ __set_state,
__clone and
__autoload
are magical in PHP classes. You
@@ -166,6 +167,18 @@ echo "text $class";
+
+
+ __set_state
+
+ This static method is called
+ for classes exported by var_export since PHP 5.1.0.
+
+
+ The only parameter of this method is an array containing exported
+ properties in the form array('property' => value, ...).
+
+
+
@@ -55,6 +55,32 @@
+
+ &reftitle.changelog;
+
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 5.1.0
+
+ Possibility to export classes and arrays containing classes using the
+ __set_state magic
+ method.
+
+
+
+
+
+
+
+
&reftitle.examples;
@@ -98,6 +124,29 @@ echo $v;
+
+
+
+
+
+ Exporting classes since PHP 5.1.0
+
+var = 5;
+var_export($a);
+?>
+]]>
+
+ &example.outputs;
+
+ 5,
+))
]]>
@@ -108,8 +157,8 @@ echo $v;
&reftitle.notes;
- Variables of type resource and arrays or objects containing
- objects couldn't be exported by this function.
+ Variables of type resource couldn't be exported by this
+ function.