<?php class A {
var $one = "111";
function __construct() { echo "construct";}
function __destruct() { echo "destruct";}
function __wakeup() { echo "wakeup";}
}
$at = new A();
$x = serialize($at);
echo "<br/>".unserialize($x);
?>
constructwakeupdestruct
Fatal error: Uncaught Error: Object of class A could not be converted to string in /in/qjls2:9
Stack trace:
#0 {main}
thrown in /in/qjls2 on line 9
destruct Process exited with code 255.
Output for 7.4.0 - 7.4.33
constructwakeupdestruct
Fatal error: Uncaught Error: Object of class A could not be converted to string in /in/qjls2:9
Stack trace:
#0 {main}
thrown in /in/qjls2 on line 9
Process exited with code 255.
constructwakeup
Catchable fatal error: Object of class A could not be converted to string in /in/qjls2 on line 9
Process exited with code 255.
Output for 5.1.3 - 5.1.6
constructwakeupdestruct<br/>Object id #2destruct
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/qjls2 on line 2
constructwakeupdestruct<br/>Object id #2destruct