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 : /proc/self/root/usr/local/src/php72/php-7.2.12/php-7.2.12/ext/opcache/tests/ |
Current File : //proc/self/root/usr/local/src/php72/php-7.2.12/php-7.2.12/ext/opcache/tests/ssa_bug_003.phpt |
--TEST-- Incorrect elision of return type checks --FILE-- <?php function test1($x) : callable { if ($x == 1) { $c = 'foo'; } elseif ($x == 2) { $c = new stdClass; } else { $c = [$x => &$x]; } return $c; } try { test1(1); } catch (Error $e) { echo "Error: {$e->getMessage()}\n"; } class Foo {} function test2() : Foo { $obj = new stdClass; return $obj; } try { test2(); } catch (Error $e) { echo "Error: {$e->getMessage()}\n"; } ?> --EXPECT-- Error: Return value of test1() must be callable, string returned Error: Return value of test2() must be an instance of Foo, instance of stdClass returned
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare