3v4l.org

run code in 300+ PHP versions simultaneously
<?php phpversion() >= "5.6.15"; $two_pow_64 = pow(2,64); echo (int) INF,"\n"; echo (int) $two_pow_64,"\n"; echo ((int) INF) % 2, "\n"; echo @((int) INF) / ((int) $two_pow_64); try { echo intdiv((int) INF), ((int) $two_pow_64); } catch (Error $e) { echo $e->getMessage(); } try { echo ((int) INF) % ((int) $two_pow_64); } catch (Error $e) { echo $e->getMessage(); }
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.24, 7.3.0 - 7.3.12
0 0 0 Warning: Division by zero in /in/5DGUI on line 8 NAN Warning: intdiv() expects exactly 2 parameters, 1 given in /in/5DGUI on line 10 0Modulo by zero
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
-9223372036854775808 0 0 Warning: Division by zero in /in/5DGUI on line 8 Fatal error: Call to undefined function intdiv() in /in/5DGUI on line 10
Process exited with code 255.

preferences:
83.13 ms | 401 KiB | 92 Q