Skip to content

Fix var_dump multi-arg hoisted sibling producer misbind (#16254, #16269, #13829) - #16466

Merged
PurHur merged 1 commit into
masterfrom
fix/var-dump-multiarg-sibling-producer-misbind
Jul 5, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/var-dump-multiarg-sibling-producer-misbind

Conversation

@PurHur

@PurHur PurHur commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference: ext/standard/var.c (php_var_dump), ext/standard/array.c (php_next, php_key).

Test plan

./vendor/bin/phpunit test/unit/VarDumpMultiargBuiltinMisbindTest.php
php bin/vm.php test/repro/maintainer_gap_var_dump_multiarg_builtin_misbind.php
php bin/vm.php test/repro/maintainer_gap_var_dump_multiarg_stream.php
./vendor/bin/phpunit test/unit/InlineCallArgProducerSlotTest.php --filter VarExportNestedArrayPointer
./vendor/bin/phpunit test/compliance/VMTest.php --filter array_pointer_var_export_concat

Verification output (VM):

int(5)
string(2) "he"
int(2)
string(1) "c"
resource(N) of type (stream)
string(8) "resource"
gettype=resource
fwrite=2

Closes #16254
Closes #16269
Closes #13829

Made with Cursor

…, #13829)

Restore correct firstSibling chain start when php-cfg hoists N stmt-level
FuncCall producers before a multi-arg consumer, and exclude array pointer
mutators from outer producer lists so var_export(key()) wires key() not next().

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant