Re: Change IntlChar::getNumericValue() to return something less horrible when the char is not numeric?
| From: | Levi Morrison | Date: | Wed, 08 Jul 2015 19:29:07 +0000 |
| Subject: | Re: Change IntlChar::getNumericValue() to return something less horrible when the char is not numeric? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-87078@lists.php.net to get a copy of this message | ||
On Wed, Jul 8, 2015 at 1:50 AM, Net Mo <netmo.php@gmail.com> wrote:
> ICU documentation:
>
> http://icu-project.org/apiref/icu4c/uchar_8h.html#a36982efc84143b9bb5a11bf54b86af48
>
> Currently the PHP function returns the U_NO_NUMERIC_VALUE constant, which
> is set to the very weird "float(-123456789)"; basically it's a value that
> it's certain it doesn't have an Unicode numeric character equivalent
> counterpart.
>
> I would change the function to return NULL instead; what do you think?
Why is comparing to U_NO_NUMERIC_VALUE undesirable?