3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = range(0, 100000); $time = microtime(true); $b = array_filter($a, function($el) { return $el % 2 === 0; }); var_dump(microtime(true) - $time); $b = []; $time = microtime(true); foreach ($a as $el) { if ($el % 2 === 0) { $b[] = $el; } } var_dump(microtime(true) - $time);
Output for 7.1.0
float(0.0099930763244629) float(0.0048260688781738)
Output for 7.0.14
float(0.010653018951416) float(0.005126953125)
Output for 7.0.10
float(0.0073869228363037) float(0.0036089420318604)
Output for 7.0.9
float(0.0076248645782471) float(0.0040018558502197)
Output for 7.0.8
float(0.0107421875) float(0.0051751136779785)
Output for 7.0.7
float(0.0067789554595947) float(0.0035231113433838)
Output for 7.0.6
float(0.012234926223755) float(0.0040810108184814)
Output for 7.0.5
float(0.036428928375244) float(0.0066659450531006)
Output for 7.0.4
float(0.016720056533813) float(0.021728992462158)
Output for 7.0.3
float(0.015082836151123) float(0.0057048797607422)
Output for 7.0.2
float(0.016173839569092) float(0.0059731006622314)
Output for 7.0.1
float(0.025079965591431) float(0.0044798851013184)
Output for 7.0.0
float(0.022835969924927) float(0.0034620761871338)
Output for hhvm-3.12.0
float(0.027776956558228) float(0.010960102081299)
Output for hhvm-3.10.0
float(0.029870986938477) float(0.012882947921753)
Output for 5.6.28
float(0.026870965957642) float(0.012237071990967)
Output for 5.6.25
float(0.026822090148926) float(0.016761064529419)
Output for 5.6.24
float(0.018306016921997) float(0.0090219974517822)
Output for 5.6.23
float(0.018664836883545) float(0.0096478462219238)
Output for 5.6.22
float(0.021281003952026) float(0.0096821784973145)
Output for 5.6.21
float(0.024044990539551) float(0.011330842971802)
Output for 5.6.20
float(0.025229930877686) float(0.01154613494873)
Output for 5.6.19
float(0.026201009750366) float(0.0095610618591309)
Output for 5.6.18
float(0.034343957901001) float(0.01432991027832)
Output for 5.6.17
float(0.017638206481934) float(0.0088419914245605)
Output for 5.6.16
float(0.020508050918579) float(0.0096449851989746)
Output for 5.6.15
float(0.01806902885437) float(0.010097980499268)
Output for 5.6.14
float(0.020095825195312) float(0.0091660022735596)
Output for 5.6.13
float(0.02081298828125) float(0.015659809112549)
Output for 5.6.12
float(0.022464036941528) float(0.011727094650269)
Output for 5.6.11
float(0.030411958694458) float(0.011780977249146)
Output for 5.6.10
float(0.017168998718262) float(0.0085029602050781)
Output for 5.6.9
float(0.025943040847778) float(0.01289701461792)
Output for 5.6.8
float(0.019821166992188) float(0.010921001434326)
Output for 5.6.7
float(0.017670154571533) float(0.0088431835174561)
Output for 5.6.6
float(0.022953987121582) float(0.010465860366821)
Output for 5.6.5
float(0.018635034561157) float(0.0088019371032715)
Output for 5.6.4
float(0.022542953491211) float(0.011287927627563)
Output for 5.6.3
float(0.018876075744629) float(0.0090899467468262)
Output for 5.6.2
float(0.032716035842896) float(0.010551929473877)
Output for 5.6.1
float(0.022346973419189) float(0.01128101348877)
Output for 5.6.0
float(0.017673969268799) float(0.0092201232910156)
Output for 5.5.38
float(0.024587154388428) float(0.011979818344116)
Output for 5.5.37
float(0.017700910568237) float(0.008793830871582)
Output for 5.5.36
float(0.020954847335815) float(0.010217905044556)
Output for 5.5.35
float(0.021208047866821) float(0.011014938354492)
Output for 5.5.34
float(0.021199941635132) float(0.0088210105895996)
Output for 5.5.33
float(0.023279905319214) float(0.011518955230713)
Output for 5.5.32
float(0.018612861633301) float(0.0091722011566162)
Output for 5.5.31
float(0.025870800018311) float(0.012449026107788)
Output for 5.5.30
float(0.023399114608765) float(0.011472940444946)
Output for 5.5.29
float(0.02328896522522) float(0.013145923614502)
Output for 5.5.28
float(0.017477035522461) float(0.0092599391937256)
Output for 5.5.27
float(0.01800012588501) float(0.0087320804595947)
Output for 5.5.26
float(0.021703004837036) float(0.0090808868408203)
Output for 5.5.25
float(0.026040077209473) float(0.011531114578247)
Output for 5.5.24
float(0.023514986038208) float(0.012444972991943)
Output for 5.5.23
float(0.01854681968689) float(0.0095529556274414)
Output for 5.5.22
float(0.019726037979126) float(0.010578870773315)
Output for 5.5.21
float(0.019042015075684) float(0.0090270042419434)
Output for 5.5.20
float(0.017460107803345) float(0.0090429782867432)
Output for 5.5.19
float(0.01823902130127) float(0.0099060535430908)
Output for 5.5.18
float(0.024782180786133) float(0.011917114257812)
Output for 5.5.16
float(0.027338981628418) float(0.011482954025269)
Output for 5.5.15
float(0.022945165634155) float(0.0085480213165283)
Output for 5.5.14
float(0.019970893859863) float(0.009476900100708)
Output for 5.5.13
float(0.024547815322876) float(0.010663032531738)
Output for 5.5.12
float(0.026263952255249) float(0.012387037277222)
Output for 5.5.11
float(0.023254156112671) float(0.010113954544067)
Output for 5.5.10
float(0.023703813552856) float(0.011296033859253)
Output for 5.5.9
float(0.023112058639526) float(0.0089600086212158)
Output for 5.5.8
float(0.018805980682373) float(0.0084459781646729)
Output for 5.5.7
float(0.020246028900146) float(0.0086748600006104)
Output for 5.5.6
float(0.018785953521729) float(0.0095541477203369)
Output for 5.5.5
float(0.031535148620605) float(0.014714002609253)
Output for 5.5.4
float(0.020821094512939) float(0.010748863220215)
Output for 5.5.3
float(0.025994062423706) float(0.012516021728516)
Output for 5.5.2
float(0.01664400100708) float(0.0089619159698486)
Output for 5.5.1
float(0.025021076202393) float(0.013416767120361)
Output for 5.5.0
float(0.018923044204712) float(0.0093109607696533)
Output for 5.4.45
float(0.025570154190063) float(0.01082706451416)
Output for 5.4.44
float(0.017228841781616) float(0.0089061260223389)
Output for 5.4.43
float(0.020128011703491) float(0.0097479820251465)
Output for 5.4.42
float(0.017607927322388) float(0.0087130069732666)
Output for 5.4.41
float(0.021116018295288) float(0.0090100765228271)
Output for 5.4.40
float(0.018110990524292) float(0.0094468593597412)
Output for 5.4.39
float(0.018012046813965) float(0.0095939636230469)
Output for 5.4.38
float(0.019330024719238) float(0.0099599361419678)
Output for 5.4.37
float(0.018424034118652) float(0.0092689990997314)
Output for 5.4.36
float(0.016988039016724) float(0.0089578628540039)
Output for 5.4.35
float(0.018995046615601) float(0.0093669891357422)
Output for 5.4.34
float(0.021456003189087) float(0.012069940567017)
Output for 5.4.32
float(0.022672176361084) float(0.012511014938354)
Output for 5.4.31
float(0.020502090454102) float(0.0086219310760498)
Output for 5.4.30
float(0.01838493347168) float(0.009354829788208)
Output for 5.4.29
float(0.019395112991333) float(0.0088920593261719)
Output for 5.4.28
float(0.016170024871826) float(0.0088458061218262)
Output for 5.4.27
float(0.019050121307373) float(0.013890027999878)
Output for 5.4.26
float(0.020792007446289) float(0.010863065719604)
Output for 5.4.25
float(0.022011041641235) float(0.0098609924316406)
Output for 5.4.24
float(0.01851487159729) float(0.0088589191436768)
Output for 5.4.23
float(0.019624948501587) float(0.0092480182647705)
Output for 5.4.22
float(0.021675109863281) float(0.0094499588012695)
Output for 5.4.21
float(0.025588989257812) float(0.012190818786621)
Output for 5.4.20
float(0.023035049438477) float(0.01093316078186)
Output for 5.4.19
float(0.022298097610474) float(0.010265111923218)
Output for 5.4.18
float(0.018394947052002) float(0.0085031986236572)
Output for 5.4.17
float(0.025084972381592) float(0.012569189071655)
Output for 5.4.16
float(0.016691923141479) float(0.0088319778442383)
Output for 5.4.15
float(0.019489049911499) float(0.0096168518066406)
Output for 5.4.14
float(0.020786046981812) float(0.010226964950562)
Output for 5.4.13
float(0.017668962478638) float(0.0099501609802246)
Output for 5.4.12
float(0.023702144622803) float(0.011577844619751)
Output for 5.4.11
float(0.018537998199463) float(0.009613037109375)
Output for 5.4.10
float(0.023890018463135) float(0.01068115234375)
Output for 5.4.9
float(0.022708892822266) float(0.01169490814209)
Output for 5.4.8
float(0.022827863693237) float(0.012197017669678)
Output for 5.4.7
float(0.016914844512939) float(0.012901782989502)
Output for 5.4.6
float(0.018247127532959) float(0.0096039772033691)
Output for 5.4.5
float(0.016561985015869) float(0.0093441009521484)
Output for 5.4.4
float(0.022589921951294) float(0.011650085449219)
Output for 5.4.3
float(0.025444984436035) float(0.012475967407227)
Output for 5.4.2
float(0.019164085388184) float(0.0094630718231201)
Output for 5.4.1
float(0.018310070037842) float(0.0093939304351807)
Output for 5.4.0
float(0.021878004074097) float(0.010516881942749)
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/F1fNT on line 10
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/F1fNT 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 in /in/F1fNT on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/F1fNT on line 7
Process exited with code 255.