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/ |
Current File : //usr/local/src/php7/php-7.0.5/Zend/tests/ns_072.phpt |
--TEST-- Testing parameter type-hinted with interface --FILE-- <?php namespace foo; interface foo { } class bar { public function __construct(foo $x = NULL) { var_dump($x); } } class test implements foo { } new bar(new test); new bar(null); new bar(new \stdclass); ?> --EXPECTF-- object(foo\test)#%d (0) { } NULL Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d Stack trace: #0 %s(%d): foo\bar->__construct(Object(stdClass)) #1 {main} thrown in %s on line %d
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare