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
> 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:
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
See also "[PHP-DEV] Digit separators for numeric literals" from Feb, 19th.
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
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
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
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