Annotation of embedaddon/php/ext/standard/tests/serialize/bug35895.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #35895 (__sleep and private property)
! 3: --FILE--
! 4: <?php
! 5: class Parents {
! 6: private $parents;
! 7: public function __sleep() {
! 8: return array("parents");
! 9: }
! 10: }
! 11:
! 12: class Child extends Parents {
! 13: private $child;
! 14: public function __sleep() {
! 15: return array_merge(array("child"), parent::__sleep());
! 16: }
! 17: }
! 18:
! 19: $obj = new Child();
! 20: serialize($obj);
! 21:
! 22: ?>
! 23: --EXPECTF--
! 24: Notice: serialize(): "parents" returned as member variable from __sleep() but does not exist in %sbug35895.php on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>