On 24/03/2022 11:19, Rowan Tommins wrote:
I have one issue with the wording in the RFC: While “Function utf8_encode is deprecated; check usage is correct and consider mb_convert_encoding or other replacement.” suggests to replace it, the part about checking the usage implies that if someone is sure about the correct usage it is fine to keep using utf8_encode(). But as the proposal wants to remove it for 9.0 I think this is somewhat misleading.


That's a fair point. The intention was to encourage people to look at whether they were using the function right in the first place, not blindly replace it with mb_convert_encoding, since the whole point of the deprecation is that they probably aren't. I'm not sure how to concisely say "replace with mb_convert_encoding if you actually need to, but maybe you can just delete this function call and your code will be better".


Maybe I'm trying to be "too helpful" there. Should we just use the generic deprecation message, and let people look up the in-depth explanation in the manual?

Anyone have any thoughts on that?

Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to