php-src/Zend/tests/lsb_003.phpt
Steph Fox 6d8760677d - killed off UEXPECT
- altered EXPECT for parser errors. This may or may not be a Good Thing.
2008-05-26 14:33:44 +00: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==