3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "Unsigned and Signed:\n"; $offset = abs(~PHP_INT_MAX) + 2 + PHP_INT_MAX; printf("%u\n",$offset); printf("%d\n",~$offset);
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Unsigned and Signed: 0 -1
Output for hhvm-3.10.0 - 3.12.0
Unsigned and Signed: 1 -2
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.2.17
Unsigned and Signed: 0 9223372036854775807
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
Unsigned and Signed: Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/S7KGj on line 5 Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/S7KGj on line 5 2 -3