Re: [RFC] Number Format Separator

From: Date: Wed, 30 Dec 2015 23:00:55 +0000
Subject: Re: [RFC] Number Format Separator
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-89929@lists.php.net to get a copy of this message
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 <tpunt@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 >

« previous php.internals (#89929) next »