3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function getFloatFromInteger($integer) { $hex = dechex($integer); $pack = pack('H*', $hex); $pack = strrev($pack); $result = unpack('d*', $pack); return $result[1]; } $test = getFloatFromInteger(4619191942746344941); echo $test;
based on RCift
Output for 4.3.0 - 7.1.0
6.6666