3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 8.9; $b = var_export(round($a, 2), true); var_dump(assert($a == $b)); echo $a ." \n"; echo $b; var_dump(gettype($a), gettype($b)); echo "\n\n\n"; assert('8.9000000000000004' != 8.9);
based on ruEDO
Output for 7.1.0 - 7.3.0alpha1
bool(true) 8.9 8.9string(6) "double" string(6) "string" Warning: assert(): assert('8.9000000000000004' != 8.9) failed in /in/A1lcP on line 17
Output for 7.0.0 - 7.0.20
bool(true) 8.9 8.9000000000000004string(6) "double" string(6) "string" Warning: assert(): assert('8.9000000000000004' != 8.9) failed in /in/A1lcP on line 17
Output for hhvm-3.15.4
bool(true) 8.9 8.9string(6) "double" string(6) "string" Warning: assert(): Assertion failed in /in/A1lcP on line 17
Output for 5.6.0 - 5.6.30
bool(true) 8.9 8.9000000000000004string(6) "double" string(6) "string" Warning: assert(): Assertion failed in /in/A1lcP on line 17