You mention no support for numeric strings, but how will settype($string,
int|float), intval(), floatval(), is_numeric() and ctype_digit() work with
this change?

I do think if you don't change the semantics for strings to number
conversion (which I agree you can't due to BC breaks) there should be an
explicit way to support "1_000_000" => (int) 1_000_000. This should be part
of the RFC.

I presume that if you were to go from numeric to string the underscores
would be stripped? What about a way not to do that? What will var_dump()
etc. show?

On Wed, Dec 30, 2015 at 5:26 PM, Thomas Punt <tp...@hotmail.co.uk> wrote:

> Hi internals!
>
> I'd like to propose for the inclusion of a digit separator in PHP. This
> will
> help to promote the readability of numerical literals in code by enabling
> for
> the underscore character to be used in between digits.
>
> RFC: https://wiki.php.net/rfc/number_format_separator
> PR: https://github.com/php/php-src/pull/1699
>
> Thanks,
> Tom
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Reply via email to