Skip to content

Fix var_export/print_r Reflection param names to value (#23308) - #31566

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-23308-var-export-print-r-reflection-names
Aug 16, 2026
Merged

Fix var_export/print_r Reflection param names to value (#23308)#31566
PurHur merged 1 commit into
masterfrom
agent/issue-23308-var-export-print-r-reflection-names

Conversation

@PurHur

@PurHur PurHur commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Override BuiltinParamNames for var_export / print_r so Reflection reports Zend stub names value,return (InternalArgInfo still says var)
  • Named value: / return: calls work; legacy var: is rejected
  • php-src ref: ext/standard/basic_functions.stub.php

Lane B note: language/behavioral IR empty; claimed Reflection signature parity with lane-overflow note (STD Lib queue unclaimed).

Closes #23308

Test plan

  • ./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/issue_23308_var_export_print_r_reflection.php'
  • ./script/phpunit.sh --filter Issue23308VarExportPrintRReflectionTest
  • ./script/phpunit.sh --filter VarExportPrintRReflection23308

Verification transcript

$ ./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/issue_23308_var_export_print_r_reflection.php'
var_export:value,return
print_r:value,return
array (
  'a' => 1,
)
Array
(
    [0] => 1
)
Unknown named parameter $var
EXIT:0

$ ./script/phpunit.sh --filter Issue23308VarExportPrintRReflectionTest
OK (2 tests, 6 assertions)

$ ./script/phpunit.sh --filter VarExportPrintRReflection23308
OK (2 tests, 2 assertions)  # VM + JIT

Made with Cursor

Match php-src basic_functions.stub.php so named value:/return: work under php-src-strict.

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

Development

Successfully merging this pull request may close these issues.

Regression: var_export/print_r Reflection names var — Zend value; named args rejected (ext/standard/basic_functions.stub.php)

1 participant