1--TEST-- 2never return type: never cannot return from finally 3--FILE-- 4<?php 5 6function foo() : never { 7 try { 8 throw new Exception('bad'); 9 } finally { 10 return; 11 } 12} 13 14// Note the lack of function call: function validated at compile-time 15?> 16--EXPECTF-- 17Fatal error: A never-returning function must not return in %s on line %d 18