3v4l.org

run code in 300+ PHP versions simultaneously
<?php CONST MIN = 1; CONST MAX = 1000000000; $result = 0; for ($i = MIN; $i <= MAX; $i++) { $result += $i; } var_dump($result); $result = (MIN + MAX) * (MAX / 2) //It's *MAX/2 because the step is 1 (there are MAX elements to the series).
Output for 5.4.0 - 5.4.17, 5.5.0 - 5.5.1
Parse error: syntax error, unexpected end of file in /in/hS5ks on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end in /in/hS5ks on line 10
Process exited with code 255.

preferences:
179.93 ms | 1399 KiB | 55 Q