3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php printf("%u",0xffffffffffffffff ); // 0 printf("%d",0xffffffffffffffff ); // 0 // max integer that can be stored as floating pt value (2 ** 53) -1: var_dump( 0x001fffffffffffff ); // float 9.007199254741E+15 var_dump( (int) 0x001fffffffffffff); // int -1 // but can do this: printf("%f", hexdec("ffffffffffffffff"));
Output for 5.2.1 - 7.1.0
00int(9007199254740991) int(9007199254740991) 18446744073709551616.000000
Output for 4.3.0 - 5.0.1, 5.0.3 - 5.2.0
00int(9007199254740991) int(9007199254740991) 18446744073709552000.000000
Output for 5.0.2
42949672959223372036854775807int(9007199254740991) int(9007199254740991) 18446744073709552000.000000