Re: Re: [RFC] Deprecations for PHP 7.1

From: Date: Thu, 18 Feb 2016 23:36:27 +0000
Subject: Re: Re: [RFC] Deprecations for PHP 7.1
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-91302@lists.php.net to get a copy of this message
Hi Zeev, Zeev Suraski wrote:
On 18 בפבר׳ 2016, at 21:58, Andrea Faulds <ajf@ajf.me> wrote: Hmm. Well, if we're doing mass deprecations, maybe we should finally get rid of hebrev() and hebrevc()? It feels out-of-place to have a poorly-documented standard library function specifically for converting between two different legacy 8-bit encodings used for Hebrew, especially when one of them is just the other with nl2br() included! Users who need to convert between different variants of ISO-8859-8 can use iconv() instead, or perhaps use a userland polyfill of hebrev/c().
I'm not aware that you can use iconv to convert visual to logical Hebrew or vice versa. Not saying you can't, just that I'm not aware it does - I don't think it support visual encodings at all. Do you know how to convert between them using iconv? If you do, I'm fine reimplementing these functions using iconv, again, if we can eliminate the pointless upgrade hassle. The other alternative of a userland version isn't that simple to write, would be slower, and most importantly buys us nothing.
Looking into it, iconv() doesn't seem to support converting between ISO-8859-8 and ISO-8859-8-I, at least on my system. Nor can mb_convert_encoding(). Both only support ISO-8859-8. I should have researched this before. hebrev() isn't redundant, then, sorry about that.
I'm guessing that hebrevc() predates nl2br() (could be wrong), but regardless, I wouldn't touch it as there's zero gain to be had.
Ah, that might explain the difference.
Last - we're not or at least shouldn't be doing mass deprecations. There should be an extremely strong reason to break perfectly good code.
Yeah, I'd be cautious about removing any of these. I do think these functions should be moved in the manual (and possibly source), though. Thanks for your input. -- Andrea Faulds https://ajf.me/

« previous php.internals (#91302) next »