3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_a = range(0, 1000000); $ts = microtime(true); $a = range(0, 1000000); for($i = 0; $i < count($a); $i++) { $_a[$i] = $_a[$i]; } echo microtime(true) - $ts; echo '------------------'; $ts = microtime(true); $a = range(0, 1000000); for($i = 0; $i < count($a); $i++) { $a[$i] = $a[$i]; } echo microtime(true) - $ts; echo '------------------'; $ts = microtime(true); $a = range(0, 1000000); for($i = 0, $c = count($a); $i < $c; $i++) { $a[$i] = $a[$i]; } echo microtime(true) - $ts; echo '------------------';
Output for 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554440 bytes) in /in/vq321 on line 8
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/vq321 on line 3
Process exited with code 255.
Output for 5.2.6 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/vq321 on line 3
Process exited with code 255.
Output for 5.2.1 - 5.2.5
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/vq321 on line 3
Process exited with code 255.
Output for 5.2.0
0.27830815315247------------------0.30282402038574------------------0.17781281471252------------------
Output for 5.1.6
0.31749296188354------------------0.33015704154968------------------0.22979211807251------------------
Output for 5.1.5
0.29872179031372------------------0.31794595718384------------------0.22712111473083------------------
Output for 5.1.4
0.3842351436615------------------0.39360809326172------------------0.2597599029541------------------
Output for 5.1.3
0.28638195991516------------------0.31383800506592------------------0.22647190093994------------------
Output for 5.1.2
0.30796194076538------------------0.40137219429016------------------0.22901797294617------------------
Output for 5.1.1
0.39284110069275------------------0.38924288749695------------------0.25106716156006------------------
Output for 5.1.0
0.29760718345642------------------0.32347393035889------------------0.22530603408813------------------
Output for 5.0.5
0.59235596656799------------------0.63155889511108------------------0.54255199432373------------------
Output for 5.0.4
0.54271793365479------------------0.58407998085022------------------0.45498204231262------------------
Output for 5.0.3
0.47675514221191------------------0.50216197967529------------------0.39469599723816------------------
Output for 5.0.2
0.54730319976807------------------0.68370485305786------------------0.45123100280762------------------
Output for 5.0.1
0.46997213363647------------------0.50174903869629------------------0.39021682739258------------------
Output for 5.0.0
0.61776089668274------------------0.63225293159485------------------0.50546598434448------------------
Output for 4.4.9
0.5124-------------------0.389904------------------0.434597------------------
Output for 4.4.8
0.468877-------------------0.501882------------------0.395692------------------
Output for 4.4.7
0.49428-------------------0.49283------------------0.396773------------------
Output for 4.4.6
-0.538985------------------0.506501-------------------0.587498------------------
Output for 4.4.5
-0.534647------------------0.500367-------------------0.608916------------------
Output for 4.4.4
0.471052-------------------0.502693------------------0.393936------------------
Output for 4.4.3
0.517362-------------------0.305186-------------------0.419184------------------
Output for 4.4.2
-0.289781------------------0.748215-------------------0.398946------------------
Output for 4.4.1
0.460467------------------0.494842-------------------0.603156------------------
Output for 4.4.0
-0.53197------------------0.503488-------------------0.604246------------------
Output for 4.3.11
-0.5248------------------0.496269-------------------0.604621------------------
Output for 4.3.10
0.486798-------------------0.492741------------------0.400684------------------
Output for 4.3.9
0.472183-------------------0.506711------------------0.391234------------------
Output for 4.3.8
0.475764-------------------0.495889------------------0.39559------------------
Output for 4.3.7
-0.514238------------------0.501791-------------------0.609914------------------
Output for 4.3.6
-0.54067------------------0.498142-------------------0.600758------------------
Output for 4.3.5
-0.519476------------------0.502421------------------0.403285------------------
Output for 4.3.4
0.465013-------------------0.505255------------------0.391643------------------
Output for 4.3.3
0.473063-------------------0.502621------------------0.393242------------------
Output for 4.3.2
0.502348-------------------0.48928------------------0.399854------------------
Output for 4.3.1
-0.535646------------------0.494231-------------------0.609531------------------
Output for 4.3.0
-0.561483------------------0.483882-------------------0.606489------------------