php-src/Zend/tests/lsb_017.phpt
2007-09-26 07:16:33 +00:00

30 lines
343 B
PHP

--TEST--
ZE2 Late Static Binding nested calls
--FILE--
<?php
class A {
public static function test($x=null) {
if (!is_null($x)) {
echo "$x\n";
}
return get_called_class();
}
}
class B extends A {
}
class C extends A {
}
class D extends A {
}
echo A::test(B::test(C::test(D::test())))."\n";
?>
==DONE==
--EXPECT--
D
C
B
A
==DONE==