xref: /PHP-7.0/Zend/tests/return_types/029.phpt (revision 778e5f3d)
1--TEST--
2return type with finally
3--INI--
4opcache.enable=0
5--FILE--
6<?php
7
8function foo() : array {
9	try {
10		throw new Exception("xxxx");
11	} finally {
12		return ;
13	}
14}
15
16foo();
17?>
18--EXPECTF--
19Fatal error: Uncaught TypeError: Return value of foo() must be of the type array, none returned in %s29.php:%d
20Stack trace:
21#0 %s(%d): foo()
22#1 {main}
23  thrown in %s029.php on line %d
24