php-src/Zend/tests/lsb_003.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

25 lines
424 B
PHP

--TEST--
ZE2 Late Static Binding creating a new class with 'static'
--FILE--
<?php
class TestClass {
public static function createInstance() {
return new static();
}
}
class ChildClass extends TestClass {}
$testClass = TestClass::createInstance();
$childClass = ChildClass::createInstance();
echo get_class($testClass) . "\n";
echo get_class($childClass) . "\n";
?>
==DONE==
--EXPECT--
TestClass
ChildClass
==DONE==