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