> Le 17 janv. 2021 à 16:58, tyson andre <tysonandre...@hotmail.com> 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) when used where an integer is expected. > This is not documented in https://www.php.net/print_r
This is the same behaviour as `print` (and as`echo`). Note also that there is also no distinction for `print`/`print_r` in rendering the string "1", the integer 1, and the boolean`true`. I think that the original intention of `print_r` was to have a “recursive” version of `print`. If some action is to be taken, I suggest to deprecate `print_r`. —Claude