3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(PHP_INT_MIN); var_dump(gettype(PHP_INT_MIN)); var_dump(gettype(-PHP_INT_MAX - 1)); var_dump(gettype(-9223372036854775808)); var_dump(is_int(PHP_INT_MIN)); var_dump(is_int(-9223372036854775808)); var_dump(-PHP_INT_MAX - 1 === -9223372036854775808); var_dump(0x80000000 << 32); var_dump(gettype(0x80000000 << 32)); var_dump(0xff000000 << 32); var_dump(-PHP_INT_MAX); var_dump(-PHP_INT_MAX - 1); var_dump(-PHP_INT_MAX - 2); var_dump(-9223372036854775807); var_dump(-9223372036854775808); var_dump(-9223372036854775809);
based on aoe88
Output for 7.0.0 - 7.2.0
int(-9223372036854775808) string(7) "integer" string(7) "integer" string(6) "double" bool(true) bool(false) bool(false) int(-9223372036854775808) string(7) "integer" int(-72057594037927936) int(-9223372036854775807) int(-9223372036854775808) float(-9.2233720368548E+18) int(-9223372036854775807) float(-9.2233720368548E+18) float(-9.2233720368548E+18)
Output for 5.3.19 - 5.6.28
Notice: Use of undefined constant PHP_INT_MIN - assumed 'PHP_INT_MIN' in /in/liGGp on line 3 string(11) "PHP_INT_MIN" Notice: Use of undefined constant PHP_INT_MIN - assumed 'PHP_INT_MIN' in /in/liGGp on line 4 string(6) "string" string(7) "integer" string(6) "double" Notice: Use of undefined constant PHP_INT_MIN - assumed 'PHP_INT_MIN' in /in/liGGp on line 7 bool(false) bool(false) bool(false) int(-9223372036854775808) string(7) "integer" int(-72057594037927936) int(-9223372036854775807) int(-9223372036854775808) float(-9.2233720368548E+18) int(-9223372036854775807) float(-9.2233720368548E+18) float(-9.2233720368548E+18)