3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(42/0); // float(INF) + E_WARNING var_dump(-42/0); // float(-INF) + E_WARNING var_dump(0/0); // float(NAN) + E_WARNING var_dump(0%0); // DivisionByZeroError
Output for 7.0.0 - 7.2.0
Warning: Division by zero in /in/hv4Ae on line 3 float(INF) Warning: Division by zero in /in/hv4Ae on line 4 float(-INF) Warning: Division by zero in /in/hv4Ae on line 5 float(NAN) Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/hv4Ae:7 Stack trace: #0 {main} thrown in /in/hv4Ae on line 7
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Warning: Division by zero in /in/hv4Ae on line 3 bool(false) Warning: Division by zero in /in/hv4Ae on line 4 bool(false) Warning: Division by zero in /in/hv4Ae on line 5 bool(false) Warning: Division by zero in /in/hv4Ae on line 7 bool(false)