3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php phpversion() >= "7.0.0beta1" or die(); $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),"\n"; try { echo intdiv( INF, $two_pow_64 ); } catch (Error $e) { echo "intdiv: ",$e->getMessage(),"\n"; } try { echo ( INF % $two_pow_64); } catch (Error $e) { echo "%: ",$e->getMessage(),"\n"; }
based on YMj2k
Output for 7.0.1 - 7.2.0
0 0 0 Warning: Division by zero in /in/VeeHA on line 9 NAN Warning: intdiv() expects parameter 1 to be integer, float given in /in/VeeHA on line 12 %: Modulo by zero
Output for 5.3.20 - 7.0.0