php-src/Zend/tests/lsb_005.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

52 lines
722 B
PHP

--TEST--
ZE2 Late Static Binding stacking static calleds
--FILE--
<?php
class TestA {
public static function test() {
echo get_class(new static()) . "\n";
TestB::test();
echo get_class(new static()) . "\n";
TestC::test();
echo get_class(new static()) . "\n";
TestBB::test();
echo get_class(new static()) . "\n";
}
}
class TestB {
public static function test() {
echo get_class(new static()) . "\n";
TestC::test();
echo get_class(new static()) . "\n";
}
}
class TestC {
public static function test() {
echo get_class(new static()) . "\n";
}
}
class TestBB extends TestB {
}
TestA::test();
?>
==DONE==
--EXPECT--
TestA
TestB
TestC
TestB
TestA
TestC
TestA
TestBB
TestC
TestBB
TestA
==DONE==