3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php phpversion() >= "7.0.0beta1" or die(); echo INF / 0; echo intdiv(INF,0); try { echo intdiv(2,0); } catch (Error $e){ echo $e->getMessage(); } try { echo 2 % 0; } catch (Error $e){ echo $e->getMessage(); }
based on G1Fjh
Output for 7.0.1 - 7.2.0
Warning: Division by zero in /in/SqVGB on line 4 INF Warning: intdiv() expects parameter 1 to be integer, float given in /in/SqVGB on line 5 Division by zeroModulo by zero
Output for 5.3.20 - 7.0.0