1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
--TEST-- Exception thrown from function with return type --FILE-- <?php function test() : array { throw new Exception(); } test(); --EXPECTF-- Fatal error: Uncaught Exception in %s:%d Stack trace: #0 %s(%d): test() #1 {main} thrown in %s on line %d