Re: [PHP-DEV] Proposal: Render floats differently from integers in print_r()

2021-01-17 Thread Kamil Tekiela
Hi Tyson, I was taught in school that trailing zeros and the decimal point can be omitted when writing a number. It reads much better when you don't have to see all the zeroes following the decimal point. When humans write a number that has no digits after the decimal point they don't write the de

Re: [PHP-DEV] Proposal: Render floats differently from integers in print_r()

2021-01-17 Thread Claude Pache
> Le 17 janv. 2021 à 16:58, tyson andre a écrit : > > Hi internals, > > Currently, print_r() will print ints and floats in exactly the same way, > despite the fact that they are different types > and floats may cause a TypeError (or be treated differently from integers, > e.g. avro encoding

[PHP-DEV] Proposal: Render floats differently from integers in print_r()

2021-01-17 Thread tyson andre
Hi internals, Currently, print_r() will print ints and floats in exactly the same way, despite the fact that they are different types and floats may cause a TypeError (or be treated differently from integers, e.g. avro encoding) when used where an integer is expected. This is not documented in h

[PHP-DEV] Re: Straw poll: Naming for `*any()` and `*all()` on iterables

2021-01-17 Thread tyson andre
Hi internals, > > I've created a straw poll for the naming pattern to use for `*any()` and > > `*all()` on iterables. > > https://wiki.php.net/rfc/any_all_on_iterable_straw_poll > > > > Background: The RFC https://wiki.php.net/rfc/any_all_on_iterable proposes > > adding only two functions, > >

[PHP-DEV] Re: [RFC] Object-scope RNG implementation

2021-01-17 Thread Go Kudo
Updated the RFC and fixed the implementation. Also made some additions to the RFC about when this feature might be useful. RFC: https://wiki.php.net/rfc/object_scope_prng Implementation PR: https://github.com/php/php-src/pull/6568 (All CI passed) The main points are as follows: - The implementat