--TEST-- Object test, __wakeup --SKIPIF-- --FILE-- b == 3 ? 'OK' : 'ERROR'; echo "\n"; } class Obj { var $a; var $b; function __construct($a, $b) { $this->a = $a; $this->b = $b; } function __wakeup() { $this->b = $this->a * 3; } } $o = new Obj(1, 2); test('object', $o, false); /* * you can add regression tests for your extension here * * the output of your test code has to be equal to the * text in the --EXPECT-- section below for the tests * to pass, differences between the output and the * expected text are interpreted as failure * * see TESTING.md for further information on * writing regression tests */ ?> --EXPECT-- object 17034f626a140211016106011101620602 OK