1--TEST-- 2GH-7900: Arrow function with never return type compile-time errors 3--INI-- 4zend.assertions=1 5assert.exception=1 6--FILE-- 7<?php 8 9$x = fn(): never => throw new \Exception('Here'); 10 11try { 12 var_dump($x()); 13} catch (\Exception $e) { 14 echo $e->getMessage(), "\n"; 15} 16 17try { 18 assert((fn(): never => 42) && false); 19} catch (\Error $e) { 20 echo $e->getMessage(), "\n"; 21} 22 23?> 24--EXPECT-- 25Here 26assert(fn(): never => 42 && false) 27