3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $n = 0 - 0.000000000000000000000000000000001; var_dump($n); var_dump(round($n)); var_dump(abs($n)); var_dump(abs(round($n))); var_dump(round($n) == 0); var_dump(round($n) === 0);
Output for 5.2.1 - 5.3.3, 5.3.7 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(-1.0E-33) float(-0) float(1.0E-33) float(0) bool(true) bool(false)
Output for 4.3.3 - 5.2.0, 5.3.4 - 5.3.6
float(-1.0E-33) float(0) float(1.0E-33) float(0) bool(true) bool(false)
Output for 4.3.0 - 4.3.2
float(-1.E-33) float(0) float(1.E-33) float(0) bool(true) bool(false)