
| Path : /usr/src/php/Zend/tests/ |
| Current File : //usr/src/php/Zend/tests/lsb_003.phpt |
--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==
--EXPECTF--
TestClass
ChildClass
==DONE==