3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array_fill(0, 1000, 'xxxxx'); $runs = 100; $first = 0.0; $second = 0.0; for ($i = 0; $i < $runs; $i++) { $start = microtime(true); foreach ($arr as $value) { strpos('xxxxxxx', $value); } $end = microtime(true); $first += ($end-$start); } print "First: " . ($first/$runs) . PHP_EOL;
Output for 7.1.0
First: 9.3319416046143E-5
Output for 7.0.14
First: -4.9376487731934E-5
Output for 7.0.6
First: 4.6119689941406E-5
Output for 7.0.5
First: 4.7733783721924E-5
Output for 7.0.4
First: 4.9550533294678E-5
Output for 7.0.3
First: 3.5994052886963E-5
Output for 7.0.2
First: 4.3599605560303E-5
Output for 7.0.1
First: 3.4270286560059E-5
Output for 7.0.0
First: 4.1425228118896E-5
Output for 5.6.28
First: 0.00020588874816895
Output for 5.6.21
First: 0.0001787543296814
Output for 5.6.20
First: 0.00017791986465454
Output for 5.6.19
First: 0.00019149780273438
Output for 5.6.18
First: 0.00015525341033936
Output for 5.6.17
First: 0.00013881206512451
Output for 5.6.16
First: 0.00016896724700928
Output for 5.6.15
First: 0.00014279365539551
Output for 5.6.14
First: 0.00016410827636719
Output for 5.6.13
First: 0.00017196893692017
Output for 5.6.12
First: 0.00012814521789551
Output for 5.6.11
First: 0.00018837213516235
Output for 5.6.10
First: 0.00020482063293457
Output for 5.6.9
First: 0.00017888784408569
Output for 5.6.8
First: 0.00012362480163574
Output for 5.6.7
First: 0.00012609720230103
Output for 5.5.35
First: 0.00019859313964844
Output for 5.5.34
First: 0.00018944263458252
Output for 5.5.33
First: 0.00013813257217407
Output for 5.5.32
First: 0.00013589143753052
Output for 5.5.31
First: 0.00014441728591919
Output for 5.5.30
First: 0.00013630867004395
Output for 5.5.29
First: 0.00012164831161499
Output for 5.5.28
First: 0.00015160322189331
Output for 5.5.27
First: 0.00015931606292725
Output for 5.5.26
First: 0.0001832389831543
Output for 5.5.25
First: 0.00019684553146362
Output for 5.5.24
First: 0.00010145902633667
Output for 5.4.45
First: 0.00032498359680176
Output for 5.4.44
First: 0.00021767616271973
Output for 5.4.43
First: 0.0001723051071167
Output for 5.4.42
First: 0.00030472755432129
Output for 5.4.41
First: 0.00026818990707397
Output for 5.4.40
First: 0.00018613338470459
Output for 5.4.39
First: 0.00017345905303955
Output for 5.4.38
First: 0.00018001794815063
Output for 5.4.37
First: 0.00021822214126587
Output for 5.4.36
First: 0.00014281272888184
Output for 5.4.35
First: 0.00013311147689819
Output for 5.4.34
First: 0.0001547646522522
Output for 5.4.32
First: 0.00013227224349976
Output for 5.4.31
First: 0.00013349533081055
Output for 5.4.30
First: 0.00013443946838379
Output for 5.4.29
First: 0.00013351678848267
Output for 5.4.28
First: 0.00013385057449341
Output for 5.4.27
First: 0.00013546943664551
Output for 5.4.26
First: 0.00013043880462646
Output for 5.4.25
First: 0.00019990682601929
Output for 5.4.24
First: 0.00013143539428711
Output for 5.4.23
First: 0.00013410091400146
Output for 5.4.22
First: 0.0001304030418396
Output for 5.4.21
First: 0.00013838052749634
Output for 5.4.20
First: 0.00013449668884277
Output for 5.4.19
First: 0.00014141798019409
Output for 5.4.18
First: 0.00014469385147095
Output for 5.4.17
First: 0.00017729520797729
Output for 5.4.16
First: 0.00016132831573486
Output for 5.4.15
First: 0.00016105890274048
Output for 5.4.14
First: 0.00015563726425171
Output for 5.4.13
First: 0.00018686532974243
Output for 5.4.12
First: 0.00019504547119141
Output for 5.4.11
First: 0.00016125440597534
Output for 5.4.10
First: 0.00015934228897095
Output for 5.4.9
First: 0.00016050100326538
Output for 5.4.8
First: 0.00020395040512085
Output for 5.4.7
First: 0.00018226146697998
Output for 5.4.6
First: 0.00015319108963013
Output for 5.4.5
First: 0.00015970230102539
Output for 5.4.4
First: 0.00015894889831543
Output for 5.4.3
First: 0.00016172647476196
Output for 5.4.2
First: 0.00015914916992187
Output for 5.4.1
First: 0.00017429351806641
Output for 5.4.0
First: 0.000158371925354
Output for 5.3.29
First: 0.00016411781311035
Output for 5.3.28
First: 0.00016216993331909
Output for 5.3.27
First: 0.00020854949951172
Output for 5.3.26
First: 0.00022047519683838
Output for 5.3.25
First: 0.00018966436386108
Output for 5.3.24
First: 0.00019109725952148
Output for 5.3.23
First: 0.00019018173217773
Output for 5.3.22
First: 0.0002164626121521
Output for 5.3.21
First: 0.00023228406906128
Output for 5.3.20
First: 0.00025667667388916
Output for 5.3.19
First: 0.00024339914321899
Output for 5.3.18
First: 0.0001868462562561
Output for 5.3.17
First: 0.00023001432418823
Output for 5.3.16
First: 0.00027452945709229
Output for 5.3.15
First: 0.0002584171295166
Output for 5.3.14
First: 0.00029238939285278
Output for 5.3.13
First: 0.00018820524215698
Output for 5.3.12
First: 0.000186767578125
Output for 5.3.11
First: 0.0002010703086853
Output for 5.3.10
First: 0.0002392840385437
Output for 5.3.9
First: 0.00054651021957397
Output for 5.3.8
First: 0.00019181728363037
Output for 5.3.7
First: 0.0002126407623291
Output for 5.3.6
First: 0.00022523164749146
Output for 5.3.5
First: 0.0001888370513916
Output for 5.3.4
First: 0.00018949270248413
Output for 5.3.3
First: 0.00026335000991821
Output for 5.3.2
First: 0.00022331714630127
Output for 5.3.1
First: 0.00024197101593018
Output for 5.3.0
First: 0.00025917291641235
Output for 5.2.17
First: 0.00019487142562866
Output for 5.2.16
First: 0.00019107341766357
Output for 5.2.15
First: 0.00019100904464722
Output for 5.2.14
First: 0.0002079701423645
Output for 5.2.13
First: 0.00027784585952759
Output for 5.2.12
First: 0.0002043080329895
Output for 5.2.11
First: 0.00033668041229248
Output for 5.2.10
First: 0.00018609762191772
Output for 5.2.9
First: 0.00021553039550781
Output for 5.2.8
First: 0.00020909547805786
Output for 5.2.7
First: 0.00021125555038452
Output for 5.2.6
First: 0.00019017457962036
Output for 5.2.5
First: 0.00023519039154053
Output for 5.2.4
First: 0.0002233099937439
Output for 5.2.3
First: 0.00018381118774414
Output for 5.2.2
First: 0.00022427797317505
Output for 5.2.1
First: 0.00023332595825195
Output for 5.2.0
First: 0.00019667387008667
Output for 5.1.6
First: 0.00016981601715088
Output for 5.1.5
First: 0.00016864538192749
Output for 5.1.4
First: 0.00017453908920288
Output for 5.1.3
First: 0.00016417741775513
Output for 5.1.2
First: 0.00018561601638794
Output for 5.1.1
First: 0.00016562223434448
Output for 5.1.0
First: 0.00016639471054077
Output for 5.0.5
First: 0.00041236639022827
Output for 5.0.4
First: 0.00042088985443115
Output for 5.0.3
First: 0.00049329280853271
Output for 5.0.2
First: 0.00041853666305542
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.00040277719497681PHP_EOL
Output for 5.0.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.00038534879684448PHP_EOL
Output for 4.4.9
First: 0.00031063
Output for 4.4.8
First: 0.00033292
Output for 4.4.7
First: 0.00033681
Output for 4.4.6
First: 0.00031732
Output for 4.4.5
First: 0.00031552
Output for 4.4.4
First: 0.0006557
Output for 4.4.3
First: 0.00031794999999999
Output for 4.4.2
First: 0.00030551
Output for 4.4.1
First: 0.00032509999999999
Output for 4.4.0
First: 0.00030227
Output for 4.3.11
First: 0.00031298
Output for 4.3.10
First: 0.0003148
Output for 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.00044501PHP_EOL
Output for 4.3.8
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: -0.00962795PHP_EOL
Output for 4.3.7
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.0004193PHP_EOL
Output for 4.3.6
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.0004272PHP_EOL
Output for 4.3.5
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.00039071PHP_EOL
Output for 4.3.4
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.00045214PHP_EOL
Output for 4.3.3
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.00039017PHP_EOL
Output for 4.3.2
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.00046760999999999PHP_EOL
Output for 4.3.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/4aiuu on line 19 First: 0.00043036PHP_EOL
Output for 4.3.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jq4Xq on line 19 First: 0.00047882PHP_EOL