You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Language · php-src-strict / diagnostics / nested frames
Problem
Engine warnings and deprecations raised inside a user function, method, or closure cite the call site (f();, $obj->m(), $fn();) instead of the inner opcode line Zend reports. Top-level scripts already report the operator line (control). Encapsed-string top-level drift is a separate issue (#32034).
Category
Language· php-src-strict / diagnostics / nested framesProblem
Engine warnings and deprecations raised inside a user function, method, or closure cite the call site (
f();,$obj->m(),$fn();) instead of the inner opcode line Zend reports. Top-level scripts already report the operator line (control). Encapsed-string top-level drift is a separate issue (#32034).Probed 2026-08-18 @
87cba84dc2— Zend 8.2.32 vsphp bin/vm.php/php bin/jit.php.function f(){ echo $missing; } f();—$missingon line 7, call on line 10class C { function go(){ echo $missing; } } (new C)->go();— inner 9, call 13$fn = function(){ echo 5.5 % 2; }; $fn();—%on line 6,$fn()on line 8%at file scopeerror_get_last()['line']follows the same wrong call-site line for unsileced undefined-variable inside a closure.php-src reference
Zend/zend_execute.c—EG(current_execute_data)->oplinefor warnings; callee opline, not theDO_FCALLcallerZend/zend_errors.c—zend_errorfilename/lineno from current execute_dataZend/zend_operators.c—mod_functionE_DEPRECATED implicit float→intPHP implementation target
lib/VM.php— when emittingE_WARNING/E_DEPRECATEDfrom an opcode inside a called frame, use that opcode'ssourceLocation->startLine, not the caller'sDO_FCALL/FUNCCALLline (related skip comment around call-site line immediates, Regression: __destruct deferred on reassignment / $obj=null — unset() OK (zend_objects.c, re-#6456) #23484)lib/Compiler.php— ensure function/method/closure opcodes keep their own startLine rather than inheriting the call nodelib/JIT.php/ AOT — same user-site line on the matching pathsruntime/*.cRepro
Done when
float % intE_DEPRECATED inside a closure cites the%line (Zend); file-scope unchangederror_get_last()['line']matches the Warning line for the unsileced closure case.phptundertest/compliance/cases/language/