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/Zend/tests/traits/ |
Current File : //usr/local/src/php7/php-7.0.5/Zend/tests/traits/inheritance003.phpt |
--TEST-- Trait method overrides base class method and satisfies prototype --FILE-- <?php error_reporting(E_ALL); abstract class Base { public abstract function sayHello(array $a); } class SubClass extends Base { public function sayHello(array $a) { echo "World!\n"; } } $s = new SubClass(); $s->sayHello(array()); trait SayWorld { public function sayHello(Base $d) { echo 'World!'; } } class MyHelloWorld extends Base { use SayWorld; } $o = new MyHelloWorld(); $o->sayHello(array()); ?> --EXPECTF-- World! Fatal error: Declaration of SayWorld::sayHello(Base $d) must be compatible with Base::sayHello(array $a) in %s on line %d
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare