Annotation of embedaddon/php/Zend/tests/lsb_022.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ZE2 Late Static Binding parent::/self:: forwarding and __callStatic
! 3: --FILE--
! 4: <?php
! 5: class A {
! 6: static function test() {
! 7: echo "A\n";
! 8: }
! 9: static function __callstatic($name, $args) {
! 10: call_user_func("static::test");
! 11: }
! 12: }
! 13: class B extends A {
! 14: static function test() {
! 15: echo "B\n";
! 16: }
! 17: static function __callstatic($name, $args) {
! 18: parent::__callstatic($name, $args);
! 19: call_user_func_array("parent::__callstatic", array($name, $args));
! 20: parent::foo();
! 21: call_user_func_array("parent::foo", $args);
! 22: call_user_func_array(array("parent","foo"), $args);
! 23: }
! 24: }
! 25: B::foo();
! 26: --EXPECT--
! 27: B
! 28: B
! 29: B
! 30: B
! 31: B
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>