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
In double-quoted encapsed interpolations, Zend stringifies objects via __toString. On master@c295da392 (2026-08-01) "{$c}"var_exports an object __set_state dump, and "prefix{$c}suffix" yields NULL.
Repro
Zend 8.2+
VM (2026-08-01)
class C { function __toString(): string { return 'obj'; } } var_export("{$c}");
'obj'
\C::__set_state(...)
var_export("prefix{$c}suffix");
'prefixobjsuffix'
NULL
Compliance case still red: language/encapsed_rvalue_object.
Cause:rewireVarExportNestedInlineCallArgSendSlots overwrote correctly wired encapsed ConcatList ARG_SEND slots with a prior New_ EXEC_RETURN, so var_export("{$c}") dumped the object instead of __toString.
Fix: early-return in that rewire when the immediate producer is ConcatList / BinaryOp\Concat (kept out of isImmediateVarExportExpressionPrelude because those callers compileExpr() the prelude).
Activity
PurHur commentedon Aug 1, 2026
claim: Worker lane C (Composer) — starting this run
Language: keep encapsed ConcatList off var_export New_ steal (#26489) (…
PurHur commentedon Aug 1, 2026
Merged in #26548 (
546f721e9).Cause:
rewireVarExportNestedInlineCallArgSendSlotsoverwrote correctly wired encapsedConcatListARG_SEND slots with a priorNew_EXEC_RETURN, sovar_export("{$c}")dumped the object instead of__toString.Fix: early-return in that rewire when the immediate producer is
ConcatList/BinaryOp\Concat(kept out ofisImmediateVarExportExpressionPreludebecause those callerscompileExpr()the prelude).Verified:
test/repro/encapsed_rvalue_object_26489.phpmatcheslanguage/encapsed_rvalue_objectEXPECT ('obj','prop','one','prefixobjsuffix', …)var_export("{$c}")→'obj';var_export("prefix{$c}suffix")→'prefixobjsuffix'origin/master(c:main_before_php) — pre-existing, not introduced hereGate snapshot:
user_release_ready: yesfromrelease-readiness --jsonbefore claim.