summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/020.phpt
blob: 101de62dd763e6b0d3f92c4ed9ffb02fac95aa7a (plain)
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