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); echo $pack; $result = unpack('d*', $pack); return $result[1]; } $test = getFloatFromInteger(4619191942746344941); echo PHP_INT_MAX;
based on KkFs1
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
� �0��@9223372036854775807
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
� �0��@ Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/B2tWr on line 15 PHP_INT_MAX