3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = range(0, 1000); $time = microtime(true); array_map(function($el) { return $el; }, $a); var_dump(microtime(true) - $time); $time = microtime(true); foreach ($a as $el) { } var_dump(microtime(true) - $time);
Output for 7.1.0
float(6.6995620727539E-5) float(1.1920928955078E-5)
Output for 7.0.14
float(7.1048736572266E-5) float(1.215934753418E-5)
Output for 7.0.10
float(6.9856643676758E-5) float(1.215934753418E-5)
Output for 7.0.9
float(6.413459777832E-5) float(1.0013580322266E-5)
Output for 7.0.8
float(7.7009201049805E-5) float(8.8214874267578E-6)
Output for 7.0.7
float(6.3896179199219E-5) float(1.0013580322266E-5)
Output for 7.0.6
float(0.00011587142944336) float(1.215934753418E-5)
Output for 7.0.5
float(0.00014114379882812) float(1.0013580322266E-5)
Output for 7.0.4
float(9.7990036010742E-5) float(1.215934753418E-5)
Output for 7.0.3
float(9.8943710327148E-5) float(1.0967254638672E-5)
Output for 7.0.2
float(9.7036361694336E-5) float(1.1920928955078E-5)
Output for 7.0.1
float(6.7949295043945E-5) float(7.8678131103516E-6)
Output for 7.0.0
float(8.7976455688477E-5) float(1.0013580322266E-5)
Output for hhvm-3.12.0
float(0.00030899047851562) float(2.6941299438477E-5)
Output for hhvm-3.10.0
float(0.00029110908508301) float(3.6001205444336E-5)
Output for 5.6.28
float(0.00037693977355957) float(5.4121017456055E-5)
Output for 5.6.25
float(0.00034499168395996) float(3.6001205444336E-5)
Output for 5.6.24
float(0.00035595893859863) float(3.6001205444336E-5)
Output for 5.6.23
float(0.0003199577331543) float(3.1948089599609E-5)
Output for 5.6.22
float(0.00024986267089844) float(2.598762512207E-5)
Output for 5.6.21
float(0.0003969669342041) float(3.0040740966797E-5)
Output for 5.6.20
float(0.00037884712219238) float(3.9100646972656E-5)
Output for 5.6.19
float(0.00033688545227051) float(3.0994415283203E-5)
Output for 5.6.18
float(0.00039196014404297) float(3.7193298339844E-5)
Output for 5.6.17
float(0.00045895576477051) float(6.1988830566406E-5)
Output for 5.6.16
float(0.00035405158996582) float(3.504753112793E-5)
Output for 5.6.15
float(0.00030517578125) float(3.0994415283203E-5)
Output for 5.6.14
float(0.00028109550476074) float(2.7894973754883E-5)
Output for 5.6.13
float(0.00038003921508789) float(3.7908554077148E-5)
Output for 5.6.12
float(0.0003960132598877) float(3.504753112793E-5)
Output for 5.6.11
float(0.00033211708068848) float(4.3153762817383E-5)
Output for 5.6.10
float(0.00035905838012695) float(3.6001205444336E-5)
Output for 5.6.9
float(0.0003969669342041) float(3.6001205444336E-5)
Output for 5.6.8
float(0.0003819465637207) float(4.3869018554688E-5)
Output for 5.6.7
float(0.00031900405883789) float(4.2200088500977E-5)
Output for 5.6.6
float(0.00036096572875977) float(4.6968460083008E-5)
Output for 5.6.5
float(0.00029706954956055) float(2.5033950805664E-5)
Output for 5.6.4
float(0.00035881996154785) float(3.6001205444336E-5)
Output for 5.6.3
float(0.00032591819763184) float(4.5061111450195E-5)
Output for 5.6.2
float(0.00037193298339844) float(4.1007995605469E-5)
Output for 5.6.1
float(0.00032591819763184) float(3.6954879760742E-5)
Output for 5.6.0
float(0.0003209114074707) float(4.6968460083008E-5)
Output for 5.5.38
float(0.00033998489379883) float(3.6954879760742E-5)
Output for 5.5.37
float(0.0003809928894043) float(4.1007995605469E-5)
Output for 5.5.36
float(0.00031399726867676) float(4.7922134399414E-5)
Output for 5.5.35
float(0.00028491020202637) float(3.6001205444336E-5)
Output for 5.5.34
float(0.00030398368835449) float(3.1948089599609E-5)
Output for 5.5.33
float(0.00023794174194336) float(2.598762512207E-5)
Output for 5.5.32
float(0.00035881996154785) float(4.1961669921875E-5)
Output for 5.5.31
float(0.00036406517028809) float(4.2915344238281E-5)
Output for 5.5.30
float(0.00033307075500488) float(3.6001205444336E-5)
Output for 5.5.29
float(0.00037312507629395) float(4.1007995605469E-5)
Output for 5.5.28
float(0.00028514862060547) float(3.1948089599609E-5)
Output for 5.5.27
float(0.00029587745666504) float(2.4795532226562E-5)
Output for 5.5.26
float(0.00031805038452148) float(3.0040740966797E-5)
Output for 5.5.25
float(0.00036191940307617) float(3.9100646972656E-5)
Output for 5.5.24
float(0.0003821849822998) float(4.1007995605469E-5)
Output for 5.5.23
float(0.0004429817199707) float(4.1007995605469E-5)
Output for 5.5.22
float(0.00033688545227051) float(3.6954879760742E-5)
Output for 5.5.21
float(0.00034904479980469) float(3.8862228393555E-5)
Output for 5.5.20
float(0.00036096572875977) float(4.1007995605469E-5)
Output for 5.5.19
float(0.00036787986755371) float(3.9815902709961E-5)
Output for 5.5.18
float(0.00033688545227051) float(3.0040740966797E-5)
Output for 5.5.16
float(0.00034809112548828) float(4.9829483032227E-5)
Output for 5.5.15
float(0.00037908554077148) float(4.1961669921875E-5)
Output for 5.5.14
float(0.00036501884460449) float(4.0054321289062E-5)
Output for 5.5.13
float(0.0003359317779541) float(3.6001205444336E-5)
Output for 5.5.12
float(0.0002291202545166) float(2.598762512207E-5)
Output for 5.5.11
float(0.00033807754516602) float(3.6954879760742E-5)
Output for 5.5.10
float(0.00031304359436035) float(4.2915344238281E-5)
Output for 5.5.9
float(0.00039505958557129) float(4.0054321289062E-5)
Output for 5.5.8
float(0.00034999847412109) float(5.1975250244141E-5)
Output for 5.5.7
float(0.00038504600524902) float(4.0054321289062E-5)
Output for 5.5.6
float(0.00028109550476074) float(3.0994415283203E-5)
Output for 5.5.5
float(0.00036907196044922) float(5.3882598876953E-5)
Output for 5.5.4
float(0.00034713745117188) float(4.1007995605469E-5)
Output for 5.5.3
float(0.00031399726867676) float(4.1007995605469E-5)
Output for 5.5.2
float(0.00034999847412109) float(3.6954879760742E-5)
Output for 5.5.1
float(0.00033903121948242) float(3.3855438232422E-5)
Output for 5.5.0
float(0.00035595893859863) float(3.814697265625E-5)
Output for 5.4.45
float(0.00033187866210938) float(5.5074691772461E-5)
Output for 5.4.44
float(0.00037908554077148) float(4.1007995605469E-5)
Output for 5.4.43
float(0.00032401084899902) float(3.504753112793E-5)
Output for 5.4.42
float(0.00037002563476562) float(4.6014785766602E-5)
Output for 5.4.41
float(0.00039100646972656) float(5.1975250244141E-5)
Output for 5.4.40
float(0.00034308433532715) float(4.4107437133789E-5)
Output for 5.4.39
float(0.00036096572875977) float(4.2915344238281E-5)
Output for 5.4.38
float(0.00030708312988281) float(4.6968460083008E-5)
Output for 5.4.37
float(0.00039219856262207) float(6.103515625E-5)
Output for 5.4.36
float(0.00037002563476562) float(4.2200088500977E-5)
Output for 5.4.35
float(0.00035309791564941) float(4.0054321289062E-5)
Output for 5.4.34
float(0.00033998489379883) float(3.814697265625E-5)
Output for 5.4.32
float(0.00032901763916016) float(4.1961669921875E-5)
Output for 5.4.31
float(0.0003209114074707) float(3.6954879760742E-5)
Output for 5.4.30
float(0.00032496452331543) float(3.6001205444336E-5)
Output for 5.4.29
float(0.0003359317779541) float(4.1007995605469E-5)
Output for 5.4.28
float(0.0002748966217041) float(3.7193298339844E-5)
Output for 5.4.27
float(0.0003659725189209) float(4.6968460083008E-5)
Output for 5.4.26
float(0.00035190582275391) float(4.2915344238281E-5)
Output for 5.4.25
float(0.00039196014404297) float(4.887580871582E-5)
Output for 5.4.24
float(0.00033712387084961) float(4.6968460083008E-5)
Output for 5.4.23
float(0.00035595893859863) float(4.4107437133789E-5)
Output for 5.4.22
float(0.00036406517028809) float(4.7206878662109E-5)
Output for 5.4.21
float(0.00038599967956543) float(4.7922134399414E-5)
Output for 5.4.20
float(0.00038909912109375) float(4.6968460083008E-5)
Output for 5.4.19
float(0.00028896331787109) float(4.1007995605469E-5)
Output for 5.4.18
float(0.00036907196044922) float(4.1007995605469E-5)
Output for 5.4.17
float(0.00036907196044922) float(3.814697265625E-5)
Output for 5.4.16
float(0.00029611587524414) float(3.504753112793E-5)
Output for 5.4.15
float(0.0003821849822998) float(4.0054321289062E-5)
Output for 5.4.14
float(0.0003669261932373) float(4.1007995605469E-5)
Output for 5.4.13
float(0.0003659725189209) float(3.8862228393555E-5)
Output for 5.4.12
float(0.00040984153747559) float(4.5061111450195E-5)
Output for 5.4.11
float(0.00034713745117188) float(4.1961669921875E-5)
Output for 5.4.10
float(0.00042390823364258) float(4.3869018554688E-5)
Output for 5.4.9
float(0.00036096572875977) float(3.3855438232422E-5)
Output for 5.4.8
float(0.00037789344787598) float(4.4107437133789E-5)
Output for 5.4.7
float(0.0003669261932373) float(4.2200088500977E-5)
Output for 5.4.6
float(0.0003201961517334) float(3.6001205444336E-5)
Output for 5.4.5
float(0.00032377243041992) float(4.3869018554688E-5)
Output for 5.4.4
float(0.00036382675170898) float(5.1021575927734E-5)
Output for 5.4.3
float(0.00038599967956543) float(4.2915344238281E-5)
Output for 5.4.2
float(0.00041508674621582) float(4.2915344238281E-5)
Output for 5.4.1
float(0.0003058910369873) float(4.1007995605469E-5)
Output for 5.4.0
float(0.00032997131347656) float(4.3153762817383E-5)
Output for 5.3.29
float(0.00026178359985352) float(3.3140182495117E-5)
Output for 5.3.28
float(0.00039410591125488) float(5.6982040405273E-5)
Output for 5.3.27
float(0.00036501884460449) float(4.1961669921875E-5)
Output for 5.3.26
float(0.00052380561828613) float(4.9114227294922E-5)
Output for 5.3.25
float(0.00028109550476074) float(3.4809112548828E-5)
Output for 5.3.24
float(0.00037312507629395) float(4.5061111450195E-5)
Output for 5.3.23
float(0.00033903121948242) float(3.8862228393555E-5)
Output for 5.3.22
float(0.00033903121948242) float(3.9815902709961E-5)
Output for 5.3.21
float(0.00038290023803711) float(3.0994415283203E-5)
Output for 5.3.20
float(0.00041699409484863) float(4.6968460083008E-5)
Output for 5.3.19
float(0.00036406517028809) float(4.1961669921875E-5)
Output for 5.3.18
float(0.00029706954956055) float(4.7922134399414E-5)
Output for 5.3.17
float(0.00033903121948242) float(4.1961669921875E-5)
Output for 5.3.16
float(0.00040602684020996) float(4.5061111450195E-5)
Output for 5.3.15
float(0.00036406517028809) float(5.793571472168E-5)
Output for 5.3.14
float(0.00039291381835938) float(4.6014785766602E-5)
Output for 5.3.13
float(0.00040793418884277) float(4.7922134399414E-5)
Output for 5.3.12
float(0.00029492378234863) float(3.6001205444336E-5)
Output for 5.3.11
float(0.00039410591125488) float(4.6968460083008E-5)
Output for 5.3.10
float(0.00039911270141602) float(4.5061111450195E-5)
Output for 5.3.9
float(0.00039315223693848) float(4.6968460083008E-5)
Output for 5.3.8
float(0.00039505958557129) float(6.0081481933594E-5)
Output for 5.3.7
float(0.00035715103149414) float(4.3869018554688E-5)
Output for 5.3.6
float(0.00039100646972656) float(6.1988830566406E-5)
Output for 5.3.5
float(0.00039815902709961) float(4.6968460083008E-5)
Output for 5.3.4
float(0.0004270076751709) float(3.0994415283203E-5)
Output for 5.3.3
float(0.00042104721069336) float(4.7922134399414E-5)
Output for 5.3.2
float(0.00038409233093262) float(4.6014785766602E-5)
Output for 5.3.1
float(0.00041294097900391) float(5.3167343139648E-5)
Output for 5.3.0
float(0.00037097930908203) float(5.1021575927734E-5)
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/a3Ngq on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/a3Ngq on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/a3Ngq on line 7
Process exited with code 255.