3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); for ($i = 0; $i < 10000; $i++) { $a[$i] = 1; } $start = microtime(true); $count = count($a); for ($i = 0; $i < $count; $i++) {} echo "Completed in ", microtime(true) - $start, " Seconds\n"; $start = microtime(true); foreach ($a as $k => $v) {} echo "Completed in ", microtime(true) - $start, " Seconds\n"; $start = microtime(true); foreach ($a as $k => &$v) {} echo "Completed in ", microtime(true) - $start, " Seconds\n";
based on DX17Z
Output for 7.4.0
Completed in 0.00010800361633301 Seconds Completed in 0.00019598007202148 Seconds Completed in 0.00052785873413086 Seconds
Output for 7.3.12
Completed in 0.00013208389282227 Seconds Completed in 0.00018906593322754 Seconds Completed in 0.00052499771118164 Seconds
Output for 7.3.11
Completed in 0.00012993812561035 Seconds Completed in 0.00019407272338867 Seconds Completed in 0.00049495697021484 Seconds
Output for 7.3.10
Completed in 9.1075897216797E-5 Seconds Completed in 0.00016188621520996 Seconds Completed in 0.00038909912109375 Seconds
Output for 7.3.9
Completed in 0.00014901161193848 Seconds Completed in 0.00025415420532227 Seconds Completed in 0.00061893463134766 Seconds
Output for 7.3.8
Completed in 0.00010919570922852 Seconds Completed in 0.00017189979553223 Seconds Completed in 0.00043106079101562 Seconds
Output for 7.3.7
Completed in 8.7976455688477E-5 Seconds Completed in 0.00016307830810547 Seconds Completed in 0.00039100646972656 Seconds
Output for 7.3.6
Completed in 0.0001070499420166 Seconds Completed in 0.00019097328186035 Seconds Completed in 0.00044584274291992 Seconds
Output for 7.3.5
Completed in 8.7976455688477E-5 Seconds Completed in 0.00016689300537109 Seconds Completed in 0.00041294097900391 Seconds
Output for 7.3.4
Completed in 0.00017786026000977 Seconds Completed in 0.0003511905670166 Seconds Completed in 0.00078797340393066 Seconds
Output for 7.3.3
Completed in 0.0001368522644043 Seconds Completed in 0.00026488304138184 Seconds Completed in 0.00066208839416504 Seconds
Output for 7.3.2
Completed in 0.00012588500976562 Seconds Completed in 0.00024104118347168 Seconds Completed in 0.00042200088500977 Seconds
Output for 7.3.1
Completed in 0.00012683868408203 Seconds Completed in 0.00025200843811035 Seconds Completed in 0.00044798851013184 Seconds
Output for 7.3.0
Completed in 9.2983245849609E-5 Seconds Completed in 0.00016212463378906 Seconds Completed in 0.00029397010803223 Seconds
Output for 7.2.25
Completed in 0.00014710426330566 Seconds Completed in 0.00019001960754395 Seconds Completed in 0.0005040168762207 Seconds
Output for 7.2.24
Completed in 0.00014305114746094 Seconds Completed in 0.00018811225891113 Seconds Completed in 0.00050497055053711 Seconds
Output for 7.2.23
Completed in 0.00010800361633301 Seconds Completed in 0.00016307830810547 Seconds Completed in 0.00039386749267578 Seconds
Output for 7.2.22
Completed in 0.00013995170593262 Seconds Completed in 0.00031614303588867 Seconds Completed in 0.0007789134979248 Seconds
Output for 7.2.21
Completed in 0.00012612342834473 Seconds Completed in 0.00019693374633789 Seconds Completed in 0.00046515464782715 Seconds
Output for 7.2.20
Completed in 0.00013494491577148 Seconds Completed in 0.00027203559875488 Seconds Completed in 0.00042605400085449 Seconds
Output for 7.2.19
Completed in 0.00014495849609375 Seconds Completed in 0.00024104118347168 Seconds Completed in 0.00055694580078125 Seconds
Output for 7.2.18
Completed in 0.0001680850982666 Seconds Completed in 0.00029993057250977 Seconds Completed in 0.00066208839416504 Seconds
Output for 7.2.17
Completed in 9.7036361694336E-5 Seconds Completed in 0.00017094612121582 Seconds Completed in 0.00037717819213867 Seconds
Output for 7.2.7
Completed in 0.00023913383483887 Seconds Completed in 0.00019288063049316 Seconds Completed in 0.00050997734069824 Seconds
Output for 7.2.6
Completed in 0.00016999244689941 Seconds Completed in 0.0002291202545166 Seconds Completed in 0.00062918663024902 Seconds
Output for 7.2.5
Completed in 0.00018405914306641 Seconds Completed in 0.00098395347595215 Seconds Completed in 0.0005638599395752 Seconds
Output for 7.2.4
Completed in 0.00014090538024902 Seconds Completed in 0.0002131462097168 Seconds Completed in 0.00053310394287109 Seconds
Output for 7.2.3
Completed in 0.0001990795135498 Seconds Completed in 0.00018620491027832 Seconds Completed in 0.00052905082702637 Seconds
Output for 7.2.2
Completed in 0.00013494491577148 Seconds Completed in 0.00024986267089844 Seconds Completed in 0.0005650520324707 Seconds
Output for 7.2.1
Completed in 0.00021910667419434 Seconds Completed in 0.0002739429473877 Seconds Completed in 0.0005800724029541 Seconds
Output for 7.2.0
Completed in 0.00026512145996094 Seconds Completed in 0.00020289421081543 Seconds Completed in 0.0005500316619873 Seconds
Output for 7.1.33
Completed in 0.00037312507629395 Seconds Completed in 0.00038814544677734 Seconds Completed in 0.00060915946960449 Seconds
Output for 7.1.32
Completed in 0.00052714347839355 Seconds Completed in 0.00059890747070312 Seconds Completed in 0.00049209594726562 Seconds
Output for 7.1.31
Completed in 0.00026488304138184 Seconds Completed in 0.00027918815612793 Seconds Completed in 0.0004429817199707 Seconds
Output for 7.1.30
Completed in 0.00033092498779297 Seconds Completed in 0.00038003921508789 Seconds Completed in 0.00054621696472168 Seconds
Output for 7.1.29
Completed in 0.00026392936706543 Seconds Completed in 0.00026798248291016 Seconds Completed in 0.0004270076751709 Seconds
Output for 7.1.28
Completed in 0.00025701522827148 Seconds Completed in 0.00027203559875488 Seconds Completed in 0.00046896934509277 Seconds
Output for 7.1.27
Completed in 0.0002601146697998 Seconds Completed in 0.00027298927307129 Seconds Completed in 0.00041508674621582 Seconds
Output for 7.1.26
Completed in 0.00030398368835449 Seconds Completed in 0.00031805038452148 Seconds Completed in 0.00055408477783203 Seconds
Output for 7.1.17
Completed in 0.00016093254089355 Seconds Completed in 0.00023603439331055 Seconds Completed in 0.00053501129150391 Seconds
Output for 7.1.16
Completed in 0.00014710426330566 Seconds Completed in 0.00022006034851074 Seconds Completed in 0.0005800724029541 Seconds
Output for 7.1.15
Completed in 0.00014400482177734 Seconds Completed in 0.00016617774963379 Seconds Completed in 0.00049901008605957 Seconds
Output for 7.1.14
Completed in 0.00018000602722168 Seconds Completed in 0.0002129077911377 Seconds Completed in 0.00071382522583008 Seconds
Output for 7.1.13
Completed in 0.00024294853210449 Seconds Completed in 0.00020384788513184 Seconds Completed in 0.00094699859619141 Seconds
Output for 7.1.12
Completed in 0.00021481513977051 Seconds Completed in 0.00022101402282715 Seconds Completed in 0.00057601928710938 Seconds
Output for 7.1.11
Completed in 0.00022006034851074 Seconds Completed in 0.00021910667419434 Seconds Completed in 0.00061702728271484 Seconds
Output for 7.1.10
Completed in 0.00028705596923828 Seconds Completed in 0.00032210350036621 Seconds Completed in 0.0012140274047852 Seconds
Output for 7.1.9
Completed in 0.00020980834960938 Seconds Completed in 0.00019407272338867 Seconds Completed in 0.0005638599395752 Seconds
Output for 7.1.8
Completed in 0.00028204917907715 Seconds Completed in 0.0003058910369873 Seconds Completed in 0.00077509880065918 Seconds
Output for 7.1.7
Completed in 0.00029420852661133 Seconds Completed in 0.0003199577331543 Seconds Completed in 0.00085115432739258 Seconds
Output for 7.1.6
Completed in 0.00026106834411621 Seconds Completed in 0.00022697448730469 Seconds Completed in 0.00060892105102539 Seconds
Output for 7.1.5
Completed in 0.00023078918457031 Seconds Completed in 0.00024104118347168 Seconds Completed in 0.00059390068054199 Seconds
Output for 7.1.4
Completed in 0.00021600723266602 Seconds Completed in 0.00020194053649902 Seconds Completed in 0.00056695938110352 Seconds
Output for 7.1.3
Completed in 0.00014400482177734 Seconds Completed in 0.00022506713867188 Seconds Completed in 0.0005190372467041 Seconds
Output for 7.1.2
Completed in 0.00014710426330566 Seconds Completed in 0.00015902519226074 Seconds Completed in 0.00049591064453125 Seconds
Output for 7.1.1
Completed in 0.00014495849609375 Seconds Completed in 0.00016689300537109 Seconds Completed in 0.00055909156799316 Seconds
Output for 7.1.0
Completed in 0.00017595291137695 Seconds Completed in 0.00023102760314941 Seconds Completed in 0.00058889389038086 Seconds
Output for 5.3.29
Completed in 0.00038814544677734 Seconds Completed in 0.00074911117553711 Seconds Completed in 0.0021319389343262 Seconds
Output for 5.3.10
Completed in 0.00052499771118164 Seconds Completed in 0.0012900829315186 Seconds Completed in 0.0010271072387695 Seconds
Output for 5.3.9
Completed in 0.00069713592529297 Seconds Completed in 0.00094795227050781 Seconds Completed in 0.0010318756103516 Seconds
Output for 5.3.8
Completed in 0.00052499771118164 Seconds Completed in 0.00055909156799316 Seconds Completed in 0.00064992904663086 Seconds
Output for 5.3.7
Completed in 0.00035905838012695 Seconds Completed in 0.00056791305541992 Seconds Completed in 0.00068902969360352 Seconds