Annotation of embedaddon/php/ext/reflection/tests/bug30146.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Reflection Bug #30146 (ReflectionProperty->getValue() requires instance for static property)
! 3: --FILE--
! 4: <?php
! 5: class test {
! 6: static public $a = 1;
! 7: }
! 8:
! 9: $r = new ReflectionProperty('test', 'a');
! 10: var_dump($r->getValue(null));
! 11:
! 12: $r->setValue(NULL, 2);
! 13: var_dump($r->getValue());
! 14:
! 15: $r->setValue(3);
! 16: var_dump($r->getValue());
! 17: ?>
! 18: ===DONE===
! 19: --EXPECT--
! 20: int(1)
! 21: int(2)
! 22: int(3)
! 23: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>