## Category `bug` · **php-src-strict** · named arguments / Reflection ## Problem Syntax highlighter / strip-whitespace builtins reject Zend stub named arguments. Probed **2026-07-27** vs host Zend **8.2.32** / `php bin/vm.php`. | Repro | Zend 8.2 | VM (2026-07-27) | |-------|----------|-----------------| | Reflection `highlight_string` | `string,return` | `string,return` | | `highlight_string(string:'<?php', return:true)` | highlighted HTML | **`Unknown named parameter $string`** | | Reflection `highlight_file` | `filename,return` | `file_name,return` | | Reflection `php_strip_whitespace` | `filename` | `file_name` | | `php_strip_whitespace(filename: __FILE__)` | stripped source | **`Unknown named parameter $filename`** (via same dispatch path) | `highlight_string` is the classic Reflection-OK / `BuiltinParamNames`-missing pattern; the file helpers also need name alignment (`filename` not `file_name`). ## php-src reference - [php/php-src `ext/standard/basic_functions.stub.php`](https://github.com/php/php-src/blob/PHP-8.2/ext/standard/basic_functions.stub.php) — `highlight_string`, `highlight_file`, `php_strip_whitespace` - Handlers: `ext/standard/basic_functions.c` / `zend_highlight.c` ## PHP implementation target - `lib/BuiltinParamNames.php` — `highlight_string` → `['string','return=']`, `highlight_file` → `['filename','return=']`, `php_strip_whitespace` → `['filename']` - Align Reflection names for `highlight_file` / `php_strip_whitespace` in `ext/standard` - No new C ## Repro ```bash ./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_highlight_strip_reflection_names.php' ``` ```php <?php try { echo strlen(highlight_string(string: '<?php', return: true)), "\n"; } catch (Throwable $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; } try { echo strlen(php_strip_whitespace(filename: __FILE__)), "\n"; } catch (Throwable $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; } ``` ## Done when - [ ] All three Reflection tables match Zend - [ ] Named forms succeed on VM - [ ] Compliance `.phpt` guard - [ ] php-src-strict; no php-compiler-strict shortcut
Activity
PurHur commentedon Jul 30, 2026
claim: PHP Compiler STD Lib Advanced — batch (issues #25063, #25097, #23785)
Hard stdlib cluster: highlight_string/file/show_source Zend HTML wire (#25063), next/prev/current on object HT (#25097), highlight Reflection names (#23785). Shipping sequential PRs; starting with #25063.
PurHur commentedon Jul 30, 2026
Batch note: #25063 merged (#25128). #25097 blocked on CFG handoff above — #23785 (highlight Reflection names) stays queued as batch item 3, not started.
PurHur commentedon Jul 30, 2026
claim: PHP Compiler STD Lib Advanced — continuing batch after #25097 merge; implementing #23785 highlight/file/strip Reflection + named filename.
Stdlib: highlight_file/show_source/php_strip_whitespace Zend stub nam…
PurHur commentedon Jul 30, 2026
Merged via #25153
Verification
highlight_file/show_source→filename, return=false;php_strip_whitespace→filenamefilename:/string:/return:OK; legacyfile_name:rejectedphpunit --filter highlight_strip_reflection_namesOK (VM+JIT)Batch (#25063, #25097, #23785) complete.