3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i=0; $arr = array(); $arr2 = array(); $time = microtime(true); while($i < 1000000) { $i++; $arr[] = $i; } $time = microtime(true) - $time; echo 'took ' . number_format($time, 3)."\n"; $time = microtime(true); while($i < 100000) { $i++; array_push($arr2, $i); } $time = microtime(true) - $time; echo 'took ' . number_format($time, 3)."\n";
Output for 7.1.0
took 0.038 took 0.000
Output for 7.0.14
took 0.040 took 0.000
Output for 7.0.12
took 0.042 took 0.000
Output for 7.0.6
took 0.051 took 0.000
Output for 7.0.5
took 0.041 took 0.000
Output for 7.0.4
took 0.037 took 0.000
Output for 7.0.0, 7.0.2 - 7.0.3
took 0.035 took 0.000
Output for 7.0.1
took 0.036 took 0.000
Output for hhvm-3.12.0
took 0.067 took 0.000
Output for hhvm-3.10.0
took 0.073 took 0.000
Output for 5.5.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/oHeDK on line 11
Process exited with code 139.
Output for 5.3.0 - 5.3.2, 5.3.4 - 5.3.8, 5.3.10 - 5.4.45
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /in/oHeDK on line 11
Process exited with code 139.
Output for 5.3.3, 5.3.9
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /in/oHeDK on line 11
Process exited with code 255.
Output for 5.2.3 - 5.2.17
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /in/oHeDK on line 12
Process exited with code 255.
Output for 5.2.1 - 5.2.2
<br /> <b>Fatal error</b>: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in <b>/in/oHeDK</b> on line <b>12</b><br />
Process exited with code 255.
Output for 5.2.0
took 0.165 took 0.000
Output for 5.1.6
took 0.204 took 0.000
Output for 5.1.5
took 0.229 took 0.000
Output for 5.1.4
took 0.215 took 0.000
Output for 5.1.3
took 0.210 took 0.000
Output for 5.1.2
took 0.219 took 0.000
Output for 5.1.1
took 0.206 took 0.000
Output for 5.1.0
took 0.207 took 0.000
Output for 5.0.5
took 0.282 took 0.000
Output for 5.0.4
took 0.325 took 0.000
Output for 5.0.3
took 0.299 took 0.000
Output for 5.0.2
took 0.264 took 0.000
Output for 4.3.3, 4.3.11, 5.0.1
took 0.314 took 0.000
Output for 5.0.0
took 0.297 took 0.000
Output for 4.4.9
took -0.676 took 0.000
Output for 4.4.8
took -0.684 took 0.000
Output for 4.4.7
took -0.690 took 0.000
Output for 4.4.6
took 0.312 took 0.000
Output for 4.4.5
took -0.689 took 0.000
Output for 4.3.1, 4.4.4
took 0.287 took 0.000
Output for 4.4.3
took 0.301 took 0.000
Output for 4.4.2
took 0.298 took 0.000
Output for 4.4.1
took 0.316 took 0.000
Output for 4.4.0
took 0.296 took 0.000
Output for 4.3.10
took 0.307 took 0.000
Output for 4.3.9
took 0.279 took 0.000
Output for 4.3.6, 4.3.8
took -0.687 took 0.000
Output for 4.3.7
took 0.318 took 0.000
Output for 4.3.5
took 0.308 took 0.000
Output for 4.3.4
took 0.305 took 0.000
Output for 4.3.2
took 0.276 took 0.000
Output for 4.3.0
took 0.291 took 0.000