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 / error-control @ · residual of #29132 (Assign RHS is green)
Problem
@$undef as a value still emits Undefined variable on VM. Zend's ZEND_BEGIN_SILENCE suppresses the fetch. Assign RHS ($x = @$undef), bare @$undef;, and print @$undef are already silent (controls). Echo, binary ops, and call arguments are not.
Issue repro: Zend + php bin/vm.php + php bin/jit.php on test/repro/maintainer_gap_at_silence_undef.php — no Undefined variable; strlen(@$undef) still emits Passing null to parameter #1 ($string) Deprecated; assign/bare/print stay silent.
./script/phpunit.sh --filter ErrorControlOperatorTest — OK (5 tests, 9 assertions)
php-cfg now materializes @$cv as an Assign temp under silence and forwards that temp so echo/arithmetic/call-arg do not re-fetch the CV after END_SILENCE.
Category
Language· php-src-strict / error-control@· residual of #29132 (Assign RHS is green)Problem
@$undefas a value still emitsUndefined variableon VM. Zend'sZEND_BEGIN_SILENCEsuppresses the fetch. Assign RHS ($x = @$undef), bare@$undef;, andprint @$undefare already silent (controls). Echo, binary ops, and call arguments are not.Probed 2026-08-17 vs Zend 8.2.32 @
8084f14996.$x = @$undef(control, #29132)NULLNULL✓echo @$undef2NULLWarning: Undefined variable $undef2@$undef3 + 111strlen(@$undef4)strlen(null)Deprecated@$undef5;/print @$undef6(control)php-src reference
Zend/zend_compile.c—ZEND_BEGIN_SILENCE/ZEND_END_SILENCEaround the silenced exprZend/zend_execute.c— undefined-variableE_WARNINGon CV fetch; skipped while EG(error_reporting) is silencedPHP implementation target
lib/Compiler.phpisErrorSuppressInnerExpr()— today includesAssign(Language: @$undef as assignment RHS still warns — Zend silences (ZEND_BEGIN_SILENCE) #29132) but notEcho_/Print_/ binary ops /FuncCallarg fetches of a silenced CVbeginSilence/endSilenceas Assign), not afterZEND_END_SILENCEErrorReportersilence depth for undefined-variable — this is a lowering hole, not a new C pathruntime/*.cRepro
Done when
echo @$undef/@$undef + 1/strlen(@$undef)emit no Undefined variable Warning (match Zend)strlen(@$undef)still emits the php-srcPassing null to parameter #1 ($string)Deprecated (do not over-silence).phptor PHPUnit guard