3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<? ini_set('memory_limit', '6400000M'); ini_set('display_errors', 1); error_reporting(E_ALL); $sec1 = 2122396090000914537739 - 2122334690000166340863; echo "$sec1"; echo "<br>"; // array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) foreach (range(2122334690000166340863, 2122396090000914537739) as $number) { echo $number,'<br />'; } ?>
based on n8NC8
Output for 7.0.0 - 7.2.0
6.1400000748061E+16<br> Warning: range(): The supplied range exceeds the maximum array size: start=2122334690000166453248 end=2122396090000914513920 in /in/dMPRF on line 11 Warning: Invalid argument supplied for foreach() in /in/dMPRF on line 11
Output for 5.6.28
6.1400000748061E+16<br> Fatal error: Out of memory (allocated 259522560) (tried to allocate 32 bytes) in /in/dMPRF on line 11
Process exited with code 255.
Output for 5.4.2 - 5.6.21
6.1400000748061E+16<br>
Process exited with code 137.
Output for 5.3.18 - 5.3.29
<? ini_set('memory_limit', '6400000M'); ini_set('display_errors', 1); error_reporting(E_ALL); $sec1 = 2122396090000914537739 - 2122334690000166340863; echo "$sec1"; echo "<br>"; // array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) foreach (range(2122334690000166340863, 2122396090000914537739) as $number) { echo $number,'<br />'; } ?>