3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = microtime(true); $array = range(0,1000000); foreach($array as $value) { $values[] = $value * $value; } echo (microtime(true) - $start);
based on 9aWXq
Output for 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554440 bytes) in /in/1tkJ8 on line 9
Process exited with code 255.
Output for hhvm-3.12.0
0.21928691864014
Output for hhvm-3.10.0
0.10392808914185
Output for 5.3.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/1tkJ8 on line 5
Process exited with code 255.
Output for 5.2.3 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/1tkJ8 on line 5
Process exited with code 255.
Output for 5.2.1 - 5.2.2
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/1tkJ8 on line 5
Process exited with code 255.
Output for 5.2.0
0.34069204330444
Output for 5.1.6
0.49200081825256
Output for 5.1.5
0.3999490737915
Output for 5.1.4
0.38582015037537
Output for 5.1.3
0.36219096183777
Output for 5.1.2
0.36200714111328
Output for 5.1.1
0.481605052948
Output for 5.1.0
0.40036201477051
Output for 5.0.5
0.6712429523468
Output for 5.0.4
0.62951302528381
Output for 5.0.3
0.62846994400024
Output for 5.0.2
0.64082312583923
Output for 5.0.1
0.65793895721436
Output for 5.0.0
0.70811486244202
Output for 4.4.9
-0.379559
Output for 4.4.8
-0.276373
Output for 4.4.7
-0.474339
Output for 4.4.6
0.566356
Output for 4.4.5
-0.462124
Output for 4.4.4
-0.429809
Output for 4.4.3
0.529369
Output for 4.4.2
-0.463556
Output for 4.4.1
-0.459446
Output for 4.4.0
0.537126
Output for 4.3.11
-0.434976
Output for 4.3.10
-0.432414
Output for 4.3.9
-0.234119
Output for 4.3.8
0.691562
Output for 4.3.7
-0.247654
Output for 4.3.6

Process exited with code 137.
Output for 4.3.5
-0.109108
Output for 4.3.4
-0.256572
Output for 4.3.3
-0.12253
Output for 4.3.2
-0.150038
Output for 4.3.1
0.113686
Output for 4.3.0
0.062462