3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $float_num = 0.0456; $exponent_part = ( floor(log($float_num, 2)) + 1 ); $mantissa_part = ( $float_num * pow(2, -$exponent_part) ); echo 'Floating value : '.$float_num.'<br>'; echo 'Exponent part : '.$exponent_part.'<br>'; echo 'Mantissa part : '.$mantissa_part.'<br>'; ?>
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Floating value : 0.0456<br>Exponent part : -4<br>Mantissa part : 0.7296<br>
Output for hhvm-3.10.0

Process exited with code 153.