Summary
html_entity_decode() with combined integer flags (e.g. ENT_QUOTES | ENT_HTML5) should decode entities. This compiler throws LogicException: html_entity_decode() flags must be an integer.
Related: #9586 tracks similar ENT_* constant rejection on htmlspecialchars() — this is the html_entity_decode() decode path.
php-src reference
ext/standard/html.c — php_html_entities() / decode with ENT_HTML5 etc.
Repro
<?php
declare(strict_types=1);
var_dump(html_entity_decode('&', ENT_QUOTES | ENT_HTML5));
Zend: string(1) "&"
VM: LogicException: html_entity_decode() flags must be an integer in this compiler build
Expected (php-src-strict)
Accept integer bitmask flags; return decoded string like Zend.
Implementation hints
Done when
- Repro green on VM
- Guard for
ENT_QUOTES | ENT_HTML5 (and named flags: arg if applicable)
Summary
html_entity_decode()with combined integer flags (e.g.ENT_QUOTES | ENT_HTML5) should decode entities. This compiler throwsLogicException: html_entity_decode() flags must be an integer.Related: #9586 tracks similar ENT_* constant rejection on
htmlspecialchars()— this is thehtml_entity_decode()decode path.php-src reference
ext/standard/html.c—php_html_entities()/ decode withENT_HTML5etc.Repro
Zend:
string(1) "&"VM:
LogicException: html_entity_decode() flags must be an integer in this compiler buildExpected (php-src-strict)
Accept integer bitmask flags; return decoded string like Zend.
Implementation hints
ext/standard/VM html helpers — allow int flag expressions, not only literal constantsDone when
ENT_QUOTES | ENT_HTML5(and namedflags:arg if applicable)