Re: [PHP-DEV] [RFC] Number Format Separator

2016-01-12 Thread Christoph Becker
Thomas Punt wrote: >> 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

RE: [PHP-DEV] [RFC] Number Format Separator

2016-01-12 Thread Thomas Punt
> 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:

RE: [PHP-DEV] [RFC] Number Format Separator

2016-01-12 Thread Thomas Punt
Hi Christoph, > echo 1_000; > will print > 1000 > > I think it is important to explicitly note that in the RFC. > > With regard to "stringy numerics": besides the potential BC break, IMHO > there is no need to support digit separators for string literals at all, > because that could easily be

Re: [PHP-DEV] [RFC] Number Format Separator

2015-12-31 Thread Michael Wallner
See also "[PHP-DEV] Digit separators for numeric literals" from Feb, 19th.

Re: [PHP-DEV] [RFC] Number Format Separator

2015-12-31 Thread Andrea Faulds
Hi Davey, Davey Shafik wrote: 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

[PHP-DEV] [RFC] Number Format Separator

2015-12-30 Thread Thomas Punt
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:

Re: [PHP-DEV] [RFC] Number Format Separator

2015-12-30 Thread Davey Shafik
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

Re: [PHP-DEV] [RFC] Number Format Separator

2015-12-30 Thread Alain Williams
On Wed, Dec 30, 2015 at 11:00:55PM +, Davey Shafik wrote: > 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

Re: [PHP-DEV] [RFC] Number Format Separator

2015-12-30 Thread Dan Ackroyd
On 30 December 2015 at 23:00, Davey Shafik wrote: > how will settype($string, int|float), intval(), floatval(), is_numeric() > and ctype_digit() work with this change? My understanding is that those functions will continue to work as they do currently. The numeric literals are