--TEST-- Object test, __sleep --SKIPIF-- a = $a; $this->b = $b; $this->c = $c; $this->d = $d; } function __sleep() { return array('a', 'b', 'c'); } # function __wakeup() { # $this->d = $this->a + $this->b + $this->c; # } } $o = new Obj(1, 2, 3, 4); test('object', $o, true); ?> --EXPECTF-- object 84c0a34f626aa16101a4002a006202a6004f626a006303 object(Obj)#%d (4) { ["a"]=> int(1) [%r"?b"?:protected"?%r]=> int(2) [%r"?c"?:("Obj":)?private"?%r]=> int(3) ["d"]=> NULL } OK