3v4l.org

run code in 300+ PHP versions simultaneously
<?php $range = range(1, 1000000); $range = array_rand($range, count($range)); foreach ($range as $r) { $s = &$r; $s++; }
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554440 bytes) in /in/OB3l7 on line 4
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.30
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/OB3l7 on line 3
Process exited with code 255.

preferences:
122.58 ms | 402 KiB | 149 Q