3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t1 = microtime(true); for($a = 0; $a < 1000; $a++) { for($i = 1; $i < 1000; $i++) { $varArray1[$a][] = $i ** ($i * 2); if($i%2==0&&$a%5==0) $varArray[$a][] = $i ** ($i * 2); else $varArray2[$a][] = $i ** ($i * 4); } } for($i = 0; $i < 1000; $i += 2) array_diff($varArray1[$i],$varArray2[$i+1]); $t2 = microtime(true); echo $t2 - $t1;
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.4.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 36864 bytes) in /in/cd2RG on line 5
Process exited with code 255.
Output for 7.3.0 - 7.3.12
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 36864 bytes) in /in/cd2RG on line 7
Process exited with code 255.
Output for 5.6.7 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/cd2RG on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35
Parse error: syntax error, unexpected '*' in /in/cd2RG on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '*' in /in/cd2RG on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/cd2RG on line 5
Process exited with code 255.

preferences:
175.06 ms | 401 KiB | 206 Q