Skip to content

Register file_get_contents() filename: named parameter (Closes #10045) - #10738

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-10045-file-get-contents-filename-named
Jun 23, 2026
Merged

Register file_get_contents() filename: named parameter (Closes #10045)#10738
PurHur merged 1 commit into
masterfrom
agent/issue-10045-file-get-contents-filename-named

Conversation

@PurHur

@PurHur PurHur commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Register file_get_contents parameter names in BuiltinParamNames (filename, use_include_path, context, offset, length) so compile-time named-argument binding matches php-src.
  • Add VM/JIT compliance guards and a maintainer repro script.

php-src reference

  • ext/standard/basic_functions.stub.phpfile_get_contents() parameter names

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php test/repro/named_file_get_contents.php
php bin/vm.php test/repro/named_file_get_contents.php
vendor/bin/phpunit --filter file_get_contents_filename_named
vendor/bin/phpunit test/unit/BuiltinParamNamesAliasTest.php --filter testFileGetContentsFilenameNamedParameter
'

Output:

'hello readfile
'
'hello readfile
'
OK (4 tests, 4 assertions)
OK (1 test, 4 assertions)

Closes #10045

Made with Cursor

Closes #10045 — VM/JIT no longer fatal on filename:; matches php-src arg names.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 270cf68 into master Jun 23, 2026
@PurHur
PurHur deleted the agent/issue-10045-file-get-contents-filename-named branch June 23, 2026 06:50
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.

Stdlib: file_get_contents() filename: named parameter rejected (ext/standard/file.c)

1 participant