1--TEST-- 2Throwing undef var in verify return 3--FILE-- 4<?php 5 6set_error_handler(function(int $severity, string $message, string $filename, int $lineNumber): void { 7 throw new ErrorException($message, 0, $severity, $filename, $lineNumber); 8}); 9 10function test(): string { 11 return $test; 12} 13 14test(); 15 16?> 17--EXPECTF-- 18Fatal error: Uncaught ErrorException: Undefined variable $test in %s:%d 19Stack trace: 20#0 %s(%d): {closure}(2, 'Undefined varia...', '%s', 8) 21#1 %s(%d): test() 22#2 {main} 23 thrown in %s on line %d 24