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) { $b = $el; } var_dump(microtime(true) - $time);
Output for 7.1.0
float(6.7949295043945E-5) float(1.8119812011719E-5)
Output for 7.0.14
float(7.2002410888672E-5) float(1.6927719116211E-5)
Output for 7.0.10
float(7.319450378418E-5) float(2.4080276489258E-5)
Output for 7.0.9
float(6.5088272094727E-5) float(1.5974044799805E-5)
Output for 7.0.8
float(7.9154968261719E-5) float(1.7166137695312E-5)
Output for 7.0.7
float(0.00011205673217773) float(2.3126602172852E-5)
Output for 7.0.6
float(0.00011181831359863) float(1.7166137695312E-5)
Output for 7.0.5
float(8.4161758422852E-5) float(1.2874603271484E-5)
Output for 7.0.4
float(9.608268737793E-5) float(1.5974044799805E-5)
Output for 7.0.3
float(8.702278137207E-5) float(1.3828277587891E-5)
Output for 7.0.2
float(9.2029571533203E-5) float(1.7166137695312E-5)
Output for 7.0.1
float(6.1988830566406E-5) float(1.0967254638672E-5)
Output for 7.0.0
float(9.0837478637695E-5) float(1.5974044799805E-5)
Output for 5.6.28
float(0.00037693977355957) float(5.5074691772461E-5)
Output for 5.6.25
float(0.00033211708068848) float(4.5061111450195E-5)
Output for 5.6.24
float(0.00036787986755371) float(4.887580871582E-5)
Output for 5.6.23
float(0.00028800964355469) float(3.6954879760742E-5)
Output for 5.6.22
float(0.00030016899108887) float(3.7908554077148E-5)
Output for 5.6.21
float(0.00042319297790527) float(5.2928924560547E-5)
Output for 5.6.20
float(0.0003361701965332) float(3.7193298339844E-5)
Output for 5.6.19
float(0.00036907196044922) float(6.1988830566406E-5)
Output for 5.6.18
float(0.00035691261291504) float(3.8862228393555E-5)
Output for 5.6.17
float(0.00034999847412109) float(4.7922134399414E-5)
Output for 5.6.16
float(0.00034594535827637) float(5.6982040405273E-5)
Output for 5.6.15
float(0.0003969669342041) float(5.1021575927734E-5)
Output for 5.6.14
float(0.00046014785766602) float(5.4836273193359E-5)
Output for 5.6.0, 5.6.13
float(0.00036883354187012) float(4.6014785766602E-5)
Output for 5.6.12
float(0.00038504600524902) float(4.887580871582E-5)
Output for 5.6.11
float(0.00032901763916016) float(4.1007995605469E-5)
Output for 5.6.10
float(0.00025296211242676) float(3.2901763916016E-5)
Output for 5.6.9
float(0.00043702125549316) float(4.6968460083008E-5)
Output for 5.6.8
float(0.0003659725189209) float(5.2928924560547E-5)
Output for 5.6.7
float(0.00034999847412109) float(5.4836273193359E-5)
Output for 5.6.6
float(0.00041294097900391) float(5.793571472168E-5)
Output for 5.6.5
float(0.00037503242492676) float(4.9114227294922E-5)
Output for 5.6.4
float(0.00056910514831543) float(4.4107437133789E-5)
Output for 5.6.3
float(0.00026512145996094) float(4.6968460083008E-5)
Output for 5.6.2
float(0.00036406517028809) float(6.5088272094727E-5)
Output for 5.6.1
float(0.00029301643371582) float(3.6954879760742E-5)
Output for 5.5.38
float(0.00037407875061035) float(4.9829483032227E-5)
Output for 5.5.37
float(0.00032401084899902) float(4.4107437133789E-5)
Output for 5.5.36
float(0.00031185150146484) float(4.1961669921875E-5)
Output for 5.5.28, 5.5.35
float(0.00037598609924316) float(5.1021575927734E-5)
Output for 5.5.34
float(0.00036382675170898) float(3.8862228393555E-5)
Output for 5.5.33
float(0.00036501884460449) float(4.7922134399414E-5)
Output for 5.5.32
float(0.00029087066650391) float(4.9114227294922E-5)
Output for 5.5.31
float(0.00032997131347656) float(4.4107437133789E-5)
Output for 5.5.30
float(0.00036811828613281) float(6.2942504882812E-5)
Output for 5.5.29
float(0.00035691261291504) float(4.7206878662109E-5)
Output for 5.5.27
float(0.00036096572875977) float(4.8160552978516E-5)
Output for 5.5.26
float(0.00035905838012695) float(4.8160552978516E-5)
Output for 5.5.25
float(0.00037693977355957) float(6.0081481933594E-5)
Output for 5.5.24
float(0.0003049373626709) float(4.0054321289062E-5)
Output for 5.5.23
float(0.00034689903259277) float(5.3882598876953E-5)
Output for 5.5.22
float(0.00034999847412109) float(6.103515625E-5)
Output for 5.5.21
float(0.00037002563476562) float(5.9843063354492E-5)
Output for 5.5.20
float(0.00037789344787598) float(6.8902969360352E-5)
Output for 5.5.19
float(0.00035715103149414) float(4.9114227294922E-5)
Output for 5.5.18
float(0.00029897689819336) float(3.9100646972656E-5)
Output for 5.5.16
float(0.00038909912109375) float(4.9114227294922E-5)
Output for 5.5.15
float(0.00036001205444336) float(4.6968460083008E-5)
Output for 5.5.14
float(0.00034713745117188) float(6.1988830566406E-5)
Output for 5.5.13
float(0.00039005279541016) float(5.6028366088867E-5)
Output for 5.5.12
float(0.00032591819763184) float(4.3869018554688E-5)
Output for 5.5.11
float(0.00033402442932129) float(4.3869018554688E-5)
Output for 5.5.10
float(0.00036096572875977) float(5.1021575927734E-5)
Output for 5.5.9
float(0.00034904479980469) float(5.6028366088867E-5)
Output for 5.5.8
float(0.00030303001403809) float(3.9100646972656E-5)
Output for 5.5.7
float(0.00034880638122559) float(3.7908554077148E-5)
Output for 5.3.27, 5.5.6
float(0.00026202201843262) float(3.4093856811523E-5)
Output for 5.5.5
float(0.00040102005004883) float(5.2928924560547E-5)
Output for 5.5.4
float(0.00030803680419922) float(5.4836273193359E-5)
Output for 5.5.3
float(0.0003199577331543) float(4.3153762817383E-5)
Output for 5.5.2
float(0.00030684471130371) float(3.7908554077148E-5)
Output for 5.5.1
float(0.00028085708618164) float(4.6014785766602E-5)
Output for 5.5.0
float(0.00023102760314941) float(3.0994415283203E-5)
Output for 5.4.43, 5.4.45
float(0.00035715103149414) float(5.1021575927734E-5)
Output for 5.4.44
float(0.00025415420532227) float(3.6954879760742E-5)
Output for 5.4.42
float(0.00037717819213867) float(5.5074691772461E-5)
Output for 5.4.41
float(0.00031304359436035) float(4.9114227294922E-5)
Output for 5.4.40
float(0.00032496452331543) float(5.6028366088867E-5)
Output for 5.4.39
float(0.00034904479980469) float(6.103515625E-5)
Output for 5.4.38
float(0.00030207633972168) float(5.2928924560547E-5)
Output for 5.4.37
float(0.00031590461730957) float(5.6982040405273E-5)
Output for 5.4.36
float(0.00035190582275391) float(5.0067901611328E-5)
Output for 5.4.35
float(0.00037503242492676) float(5.1021575927734E-5)
Output for 5.4.34
float(0.00037693977355957) float(5.1975250244141E-5)
Output for 5.4.32
float(0.00032997131347656) float(4.6014785766602E-5)
Output for 5.4.31
float(0.00036215782165527) float(4.6968460083008E-5)
Output for 5.4.30
float(0.00035905838012695) float(4.9114227294922E-5)
Output for 5.4.29
float(0.00039196014404297) float(6.413459777832E-5)
Output for 5.4.28
float(0.00033307075500488) float(5.3167343139648E-5)
Output for 5.4.27
float(0.00031304359436035) float(5.2928924560547E-5)
Output for 5.4.26
float(0.00039792060852051) float(5.5074691772461E-5)
Output for 5.4.25
float(0.00034999847412109) float(4.887580871582E-5)
Output for 5.4.24
float(0.00037693977355957) float(7.7009201049805E-5)
Output for 5.4.23
float(0.00025701522827148) float(4.4822692871094E-5)
Output for 5.4.22
float(0.00030398368835449) float(4.1961669921875E-5)
Output for 5.4.21
float(0.00034093856811523) float(6.0081481933594E-5)
Output for 5.4.20
float(0.00031208992004395) float(4.5061111450195E-5)
Output for 5.4.19
float(0.00039386749267578) float(3.2901763916016E-5)
Output for 5.4.18
float(0.00023388862609863) float(3.4093856811523E-5)
Output for 5.4.17
float(0.00022983551025391) float(3.1948089599609E-5)
Output for 5.4.16
float(0.0003349781036377) float(4.6968460083008E-5)
Output for 5.4.15
float(0.00022101402282715) float(3.0994415283203E-5)
Output for 5.4.14
float(0.00026512145996094) float(3.8862228393555E-5)
Output for 5.4.13
float(0.00023102760314941) float(3.4093856811523E-5)
Output for 5.4.12
float(0.00031900405883789) float(4.6014785766602E-5)
Output for 5.4.11
float(0.00033712387084961) float(5.3882598876953E-5)
Output for 5.4.10
float(0.00030303001403809) float(5.6982040405273E-5)
Output for 5.4.9
float(0.00025391578674316) float(3.1948089599609E-5)
Output for 5.4.8
float(0.00021600723266602) float(3.6001205444336E-5)
Output for 5.4.7
float(0.00021600723266602) float(3.0994415283203E-5)
Output for 5.4.6
float(0.00027203559875488) float(4.1007995605469E-5)
Output for 5.4.5
float(0.00024795532226562) float(3.4809112548828E-5)
Output for 5.4.4
float(0.00022006034851074) float(3.0994415283203E-5)
Output for 5.4.3
float(0.00027012825012207) float(3.7908554077148E-5)
Output for 5.4.2
float(0.00031781196594238) float(3.0994415283203E-5)
Output for 5.4.1
float(0.00028109550476074) float(4.0054321289062E-5)
Output for 5.4.0
float(0.00024008750915527) float(3.814697265625E-5)
Output for 5.3.29
float(0.00036191940307617) float(5.6028366088867E-5)
Output for 5.3.28
float(0.00032401084899902) float(4.6968460083008E-5)
Output for 5.3.26
float(0.00023412704467773) float(4.2915344238281E-5)
Output for 5.3.25
float(0.00022506713867188) float(3.504753112793E-5)
Output for 5.3.24
float(0.00022411346435547) float(3.3855438232422E-5)
Output for 5.3.23
float(0.00022482872009277) float(3.6001205444336E-5)
Output for 5.3.22
float(0.00022292137145996) float(3.3140182495117E-5)
Output for 5.3.21
float(0.00036287307739258) float(5.4121017456055E-5)
Output for 5.3.5, 5.3.20
float(0.00023102760314941) float(3.2901763916016E-5)
Output for 5.3.19
float(0.0001981258392334) float(2.8133392333984E-5)
Output for 5.3.18
float(0.00031709671020508) float(4.6014785766602E-5)
Output for 5.3.17
float(0.00027608871459961) float(3.3855438232422E-5)
Output for 5.3.16
float(0.00022411346435547) float(3.1948089599609E-5)
Output for 5.3.15
float(0.00026488304138184) float(4.0054321289062E-5)
Output for 5.3.14
float(0.0002739429473877) float(4.1961669921875E-5)
Output for 5.3.13
float(0.00022983551025391) float(3.6001205444336E-5)
Output for 5.3.12
float(0.00022292137145996) float(3.6001205444336E-5)
Output for 5.3.11
float(0.00019097328186035) float(4.5061111450195E-5)
Output for 5.3.10
float(0.00028896331787109) float(4.6014785766602E-5)
Output for 5.3.9
float(0.00022792816162109) float(3.3855438232422E-5)
Output for 5.3.8
float(0.0002288818359375) float(3.504753112793E-5)
Output for 5.3.7
float(0.00022697448730469) float(3.2901763916016E-5)
Output for 5.3.6
float(0.00022792816162109) float(3.504753112793E-5)
Output for 5.3.4
float(0.00032520294189453) float(5.0067901611328E-5)
Output for 5.3.3
float(0.00023007392883301) float(3.7908554077148E-5)
Output for 5.3.2
float(0.00023913383483887) float(4.3869018554688E-5)
Output for 5.3.1
float(0.00026798248291016) float(5.793571472168E-5)
Output for 5.3.0
float(0.00035595893859863) float(5.6982040405273E-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/pFgiC 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/pFgiC on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/pFgiC on line 7
Process exited with code 255.