1--TEST-- 2never return type: unacceptable cases: implicit return in a function 3--FILE-- 4<?php 5 6function foo(): never { 7 if (false) { 8 throw new Exception('bad'); 9 } 10} 11 12foo(); 13?> 14--EXPECTF-- 15Fatal error: Uncaught TypeError: foo(): never-returning function must not implicitly return in %s:%d 16Stack trace: 17#0 %s(%d): foo() 18#1 {main} 19 thrown in %s on line %d 20