As reference, I'll put here what some languages does on this case: Java: -0.00 (http://ideone.com/NOxen1) Python: -0.00 (http://ideone.com/llxGHA) Ruby: -0.00 (http://ideone.com/j3KgMd) C++14: -0.00 (http://ideone.com/P3WdoJ) Node.js: -0.00 (http://ideone.com/31gQgV - v0.12)
C#: 0.00 (http://ideone.com/vW0F0b) The most languages converts to -0.00 too, except by C#. It seems to be the correct behaviour, but by another way, it could be confused too. For instance, if you are treating money then you will need to check if it is zero then abs() it to avoid this things (because $ -0.00 makes no sense). In all case, I should vote to accept it fix (If I could vote, of course). 2016-11-25 15:06 GMT-02:00 Craig Duncan <p...@duncanc.co.uk>: > On 25 November 2016 at 07:54, Craig Duncan <p...@duncanc.co.uk> wrote: > >> I've submit a PR (https://github.com/php/php-src/pull/2220) to fix a bug ( >> https://bugs.php.net/bug.php?id=73581). >> > It sounds like opinions are divided on this, I'll draft an RFC including > the other instances Christoph mentioned -- David Rodrigues -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php