php-src/Zend/tests/lsb_004.phpt
2020-02-03 22:52:20 +01:00

20 lines
335 B
PHP

--TEST--
ZE2 Late Static Binding testing get_called_class()
--FILE--
<?php
class TestClass {
public static function getClassName() {
return get_called_class();
}
}
class ChildClass extends TestClass {}
echo TestClass::getClassName() . "\n";
echo ChildClass::getClassName() . "\n";
?>
--EXPECT--
TestClass
ChildClass