Category
bug · php-src-strict · named arguments / Reflection
Problem
HTML entity decode helpers still advertise legacy quote_style instead of Zend stub flags, so flags: named calls fail (and $string also fails when paired). Positional calls match. Probed 2026-07-26 vs host Zend 8.2.32.
| Repro |
Zend 8.2 |
VM (2026-07-26) |
Reflection htmlspecialchars_decode |
string,flags |
string,quote_style |
Reflection html_entity_decode |
string,flags,encoding |
string,quote_style,encoding |
htmlspecialchars_decode(string: "&", flags: ENT_QUOTES) |
"&" |
Unknown named parameter $string (or $flags if string positional) |
html_entity_decode(string: "&", flags: ENT_QUOTES) |
"&" |
Unknown named parameter $string |
php-src reference
PHP implementation target
lib/BuiltinParamNames.php — rename quote_style → flags for both
- Reflection + named-arg dispatch; PHP-in-PHP only; no new C
Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r '\''$r=new ReflectionFunction("htmlspecialchars_decode"); foreach($r->getParameters() as $p) echo $p->getName(), "\n"; try { echo htmlspecialchars_decode("&", flags: ENT_QUOTES), "\n"; } catch (Throwable $e) { echo $e->getMessage(), "\n"; }'\'''
Done when
Category
bug· php-src-strict · named arguments / ReflectionProblem
HTML entity decode helpers still advertise legacy
quote_styleinstead of Zend stubflags, soflags:named calls fail (and$stringalso fails when paired). Positional calls match. Probed 2026-07-26 vs host Zend 8.2.32.htmlspecialchars_decodestring,flagsstring,quote_stylehtml_entity_decodestring,flags,encodingstring,quote_style,encodinghtmlspecialchars_decode(string: "&", flags: ENT_QUOTES)"&"Unknown named parameter $string(or$flagsif string positional)html_entity_decode(string: "&", flags: ENT_QUOTES)"&"Unknown named parameter $stringphp-src reference
ext/standard/basic_functions.stub.php—htmlspecialchars_decode(string $string, int $flags = …),html_entity_decode(string $string, int $flags = …, ?string $encoding = null)PHP implementation target
lib/BuiltinParamNames.php— renamequote_style→flagsfor bothRepro
Done when
flags(notquote_style) for both functionsstring/flags/encoding) match Zend on VM.phpt+test/repro/issue_NNNN_*.php