Hi internals. Following a brief discussion on the behaviour of number_format() last year I'd like to start discussion around an RFC to bring consistency to negative zero.
When number_format() is passed -0 it doesn't display the negative sign, however if it's passed something that rounds to -0 then it does display the negative sign. https://3v4l.org/k4roB I believe these two operations should yield the same result. The RFC takes the stance that the rounding version should be changed to never display -0, but I'm open to hearing arguments to change number_format() to always display the negative sign when it's working with a negative number. https://wiki.php.net/rfc/number_format_negative_zero Thanks, Craig