1--TEST-- 2return type with finally 3--FILE-- 4<?php 5 6function foo() : array { 7 try { 8 throw new Exception("xxxx"); 9 } finally { 10 return null; 11 } 12} 13 14foo(); 15?> 16--EXPECTF-- 17Fatal error: Uncaught Exception: xxxx in %s:%d 18Stack trace: 19#0 %s(%d): foo() 20#1 {main} 21 22Next TypeError: foo(): Return value must be of type array, null returned in %s:%d 23Stack trace: 24#0 %s(%d): foo() 25#1 {main} 26 thrown in %s029.php on line %d 27