3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 4121.57; $b = 3998; $c = 123.57; $d = round( $a - $b - $c, 2); $e = round( $d, 2 ); echo "\n"; echo str_pad(print_r($d,TRUE),4,' ')." // NEGATIVE ZERO?"."\n"; echo str_pad(print_r($e,TRUE),4,' ')." // Don't worry, it rounds to zero! -_-"."\n";
Output for 4.3.0 - 5.2.6, 5.3.0 - 7.1.0
-0 // NEGATIVE ZERO? 0 // Don't worry, it rounds to zero! -_-
Output for 5.2.7 - 5.2.17
-0 // NEGATIVE ZERO? -0 // Don't worry, it rounds to zero! -_-