3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $number = '2.05'; echo '1:'; var_dump($number); $number1 = round($number * 100); $number2 = $number * 100; echo "\n2: "; var_export($number1) ; var_export($number2); var_export($number1 == $number2); echo "\n3: "; $ret1 = intval( $number1); $ret2 = intval( $number2); var_dump($ret1); var_dump($ret2); ?>
based on kLoFD
Output for 7.0.14 - 7.1.0
1:string(4) "2.05" 2: 205.0204.99999999999997false 3: int(205) int(204)
Output for 7.0.2 - 7.0.6
1:string(4) "2.05" 2: 205.0204.999999999999971578291false 3: int(205) int(204)
Output for 5.4.39 - 5.6.21, 7.0.0 - 7.0.1
1:string(4) "2.05" 2: 205204.999999999999971578291false 3: int(205) int(204)
Output for 4.3.0 - 5.4.21, hhvm-3.10.0 - 3.12.0
1:string(4) "2.05" 2: 205205false 3: int(205) int(204)
Output for 5.6.28
1:string(4) "2.05" 2: 205204.99999999999997false 3: int(205) int(204)
Output for 5.4.22 - 5.4.38
1:string(4) "2.05" 2: 205204.999999999999971578290569595992565155029296875false 3: int(205) int(204)