3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = -9223372036854775808; $var2 = ~PHP_INT_MAX; $var3 = -9223372036854775807; var_dump($var, $var2, $var3); $var = 9223372036854775807; $var2 = PHP_INT_MAX; $var3 = ~~PHP_INT_MAX; var_dump($var, $var2, $var3);
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(-9.2233720368548E+18) int(-9223372036854775808) int(-9223372036854775807) int(9223372036854775807) int(9223372036854775807) int(9223372036854775807)
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/rOaKe on line 4 float(-9.2233720368548E+18) string(11) "�����������" int(-9223372036854775807) Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/rOaKe on line 10 Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/rOaKe on line 11 int(9223372036854775807) string(11) "PHP_INT_MAX" string(11) "PHP_INT_MAX"