xref: /PHP-8.0/Zend/tests/lsb_004.phpt (revision f8d79582)
1--TEST--
2ZE2 Late Static Binding testing get_called_class()
3--FILE--
4<?php
5
6class TestClass {
7    public static function getClassName() {
8        return get_called_class();
9    }
10}
11
12class ChildClass extends TestClass {}
13
14echo TestClass::getClassName() . "\n";
15echo ChildClass::getClassName() . "\n";
16?>
17--EXPECT--
18TestClass
19ChildClass
20