3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo intval(-1); $n=sprintf('%u',-1); var_dump($n); var_dump((int)($n)); var_dump((int)($n+0));
Output for 5.2.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
-1string(20) "18446744073709551615" int(9223372036854775807) int(0)
Output for 4.3.0 - 5.2.3
-1string(10) "4294967295" int(4294967295) int(4294967295)