Skip to content

Fix var_export($domProp, true) after @ silence misbind (#21975) - #22198

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-21975-var-export-dom-prop
Jul 22, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-21975-var-export-dom-prop

Conversation

@PurHur

@PurHur PurHur commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Root cause: #15916 guard in tryFoldHoistedBoolNullLiteralCallArg rejected folding trailing true whenever producerOrdinal === 0 inside an @ end-block. After @$d->loadHTML(...), var_export($domProp, true) left PropertyFetch mapped to arg1 and arg0 as a stale EXEC_RETURN (true / NULL).
  • Fix: reject only when argIndex === 0 (preserve var_export(@get_cfg_var(...), true)).
  • Restamp gen-0 lowering_source_fingerprint so north-star5-fast stays green.

Closes #21975

php-src reference

  • ext/standard/var.c — PHP_FUNCTION(var_export)
  • DOM props: ext/dom/php_dom.c read handlers (repro only)

PHP implementation

  • lib/Compiler.php — tryFoldHoistedBoolNullLiteralCallArg error-suppress guard

Test plan

  • Issue repro VM + JIT match Zend
  • ./script/phpunit.sh --filter 'var_export_dom_prop_return_true|get_cfg_var_display_errors|ErrorSuppressInlineReturnSlot'
  • php script/check-bootstrap-gen0-manifest-sync.php → OK
  • make north-star5-verify-fast → OK
  • ./script/release-readiness.sh --json → "user_release_ready": "yes"

Verification transcript

# repro (VM)
nodeName='p'
data='hello'
onearg='hello'
assign='hello'

# PHPUnit
OK (12 tests, 32 assertions)

check-bootstrap-gen0-manifest-sync: OK (... lowering_source_fingerprint=a3d6cb8b689e…)
north-star5-verify: OK (fast)
"user_release_ready": "yes"

Made with Cursor

Tighten the #15916 error-suppress ConstFetch fold guard to arg #0 only so
trailing return-mode true after a sibling PropertyFetch still folds; restamp
gen-0 lowering fingerprint for north-star5-fast.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/issue-21975-var-export-dom-prop branch from b93eb09 to 9709924 Compare July 22, 2026 13:05
@PurHur
PurHur merged commit 157acc8 into master Jul 22, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-21975-var-export-dom-prop branch July 22, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: var_export($domNode->prop, true) poisons DOM property fetch — true/NULL not string (re-#11399/#10373, ext/standard/var.c)

1 participant