# Decoding HTML and the Ambiguous Ampersand

- Thread: https://externals.io/message/125036
- Original archive: https://news-web.php.net/php.internals/125036
- Started by Gina P. Banyard on 2024-08-17T22:39:55+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #125036 — Gina P. Banyard — 2024-08-17T22:39:55+00:00

URL: https://externals.io/message/125036#125036

> [...]
>
> I have submitted an RFC draft for including the proposed feature from this issue. Thanks to everyone who helped me in this process. It’s my first RFC, so I apologize in advance for any mistakes I’ve made in the process.
>
> https://wiki.php.net/rfc/decode_html
>
> This is proposed for a future PHP version after 8.4.

I think the general idea is sensible.
Only focusing on UTF-8 is also a good design decision.
It took me a second to figure out what the $context parameters purpose was as you introduce the constant later in the RFC.
However, I will echo another message in that this should be an enum because it is a new API.
Forcing the user to specify the context in which this function is called also seems like a good idea.

Best regards,
Gina P. Banyard
