mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
22 lines
342 B
PHP
22 lines
342 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";
|
|
?>
|
|
==DONE==
|
|
--EXPECTF--
|
|
TestClass
|
|
ChildClass
|
|
==DONE==
|