3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sum = 0; for($i = 2; $i < 10; $i++) { $sum += (1 /($i^2)); } echo 'The sum is '.$sum; echo 'The sum is '.( (1/(2^2)) );
based on ojg17
Output for 7.0.0 - 7.1.0
Warning: Division by zero in /in/hq9t5 on line 5 The sum is INF Warning: Division by zero in /in/hq9t5 on line 10 The sum is INF
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
Warning: Division by zero in /in/hq9t5 on line 5 The sum is 1.9504329004329 Warning: Division by zero in /in/hq9t5 on line 10 The sum is