Annotation of embedaddon/php/Zend/tests/bug40757.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #40757 (get_object_vars() get nothing in child class)
! 3: --FILE--
! 4: <?php
! 5: class Base {
! 6: private $p1='sadf';
! 7:
! 8: function getFields($obj){
! 9: return get_object_vars($obj);
! 10: }
! 11: }
! 12:
! 13: class Child extends Base { }
! 14:
! 15: $base=new Base();
! 16: print_r($base->getFields(new Base()));
! 17: $child=new Child();
! 18: print_r($child->getFields(new Base()));
! 19: ?>
! 20: --EXPECT--
! 21: Array
! 22: (
! 23: [p1] => sadf
! 24: )
! 25: Array
! 26: (
! 27: [p1] => sadf
! 28: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>