Skip to content

Fix var_dump(property_exists(), isset()) mixed sibling arg wiring (#15646) - #35671

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-15646-var-dump-property-exists-isset
Aug 28, 2026
Merged

Fix var_dump(property_exists(), isset()) mixed sibling arg wiring (#15646)#35671
PurHur merged 1 commit into
masterfrom
agent/issue-15646-var-dump-property-exists-isset

Conversation

@PurHur

@PurHur PurHur commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

php-src

Zend/zend_compile.c — sibling call-arg temps; observable behavior matches property_exists() + isset() on uninitialized typed properties (Zend/zend_builtin_functions.c, zend_object_handlers.c).

Verification

./script/aot-smoke.sh
# aot-smoke: 8 passed, 0 failed

./script/phpunit.sh --filter 'InlineCallArgProducerSlotTest::testVarDumpPropertyExistsIssetUninitTypedProperty|PropertyExistsIncompleteClassTest'
# OK (2 tests, 12 assertions)

php bin/vm.php -r 'class C { public int $x; } $o=new C(); var_dump(property_exists($o,"x"), isset($o->x));'
# bool(true)
# bool(false)

Closes #15646

Made with Cursor

…ducers (#15646)

When hoisted call-arg producers align 1:1 with call args but arg #0 is a FuncCall
and arg #1 is Isset_, findHoistedIssetOrEmptyProducerForCallArg must not fall back
to hoisted[0] (the Isset_) for earlier args — that stole isset's slot for
property_exists and broke var_dump on uninitialized typed properties.

Also assert PropertyExistsJitHelper::existsArgv returns int 0/1, not strict false.

Verified:
- ./script/aot-smoke.sh → 8 passed, 0 failed
- ./script/phpunit.sh --filter 'InlineCallArgProducerSlotTest::testVarDumpPropertyExistsIssetUninitTypedProperty|PropertyExistsIncompleteClassTest' → OK
- php bin/vm.php: var_dump(property_exists($o,'x'), isset($o->x)) → bool(true)\nbool(false)

Closes #15646

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit be81965 into master Aug 28, 2026
@PurHur
PurHur deleted the agent/issue-15646-var-dump-property-exists-isset branch August 28, 2026 23:43
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_dump(property_exists(), isset()) on uninitialized typed property fatals (Zend/zend_builtin_functions.c)

1 participant