3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define ('BENCHMARK_ITERATIONS', 1000); $r = microtime(1); for ($i = 0; $i < BENCHMARK_ITERATIONS; $i++) { preg_match('/([0-9]+)USD(.+)/', 'DATA-THAT-SHOULD-BE-REMOVED-@##($(@# 89USD', $matches); } var_dump(microtime(1) - $r); $r = microtime(1); for ($i = 0; $i < BENCHMARK_ITERATIONS; $i++) { substr('DATA-THAT-SHOULD-BE-REMOVED-@##($(@# 89USD', 36); } var_dump(microtime(1) - $r);
Output for 7.1.0
float(0.0003359317779541) float(9.0122222900391E-5)
Output for 7.0.14
float(0.00033187866210938) float(8.8930130004883E-5)
Output for 7.0.6
float(0.0003969669342041) float(4.3153762817383E-5)
Output for 7.0.5
float(0.00024890899658203) float(3.8862228393555E-5)
Output for 7.0.4
float(0.00021004676818848) float(3.9815902709961E-5)
Output for 7.0.3
float(0.0006110668182373) float(0.0001060962677002)
Output for 7.0.2
float(0.00031614303588867) float(5.0067901611328E-5)
Output for 7.0.1
float(0.00031208992004395) float(5.1975250244141E-5)
Output for 7.0.0
float(0.00039410591125488) float(6.6041946411133E-5)
Output for 5.6.28
float(0.0039141178131104) float(0.0003049373626709)
Output for 5.6.21
float(0.0030889511108398) float(0.00021505355834961)
Output for 5.6.20
float(0.002830982208252) float(0.0001828670501709)
Output for 5.6.19
float(0.0025839805603027) float(0.00018095970153809)
Output for 5.6.18
float(0.0025451183319092) float(0.00018000602722168)
Output for 5.6.17
float(0.0028891563415527) float(0.00019502639770508)
Output for 5.6.16
float(0.0030670166015625) float(0.00021195411682129)
Output for 5.6.15
float(0.0032989978790283) float(0.00024199485778809)
Output for 5.6.14
float(0.0030889511108398) float(0.00021195411682129)
Output for 5.6.13
float(0.0028440952301025) float(0.00018906593322754)
Output for 5.6.12
float(0.0030958652496338) float(0.00020813941955566)
Output for 5.6.11
float(0.0020568370819092) float(0.00014209747314453)
Output for 5.6.10
float(0.001957893371582) float(0.00017094612121582)
Output for 5.6.9
float(0.0031981468200684) float(0.00025010108947754)
Output for 5.6.8
float(0.0033788681030273) float(0.00021004676818848)
Output for 5.5.35
float(0.0030419826507568) float(0.00023388862609863)
Output for 5.5.34
float(0.0019750595092773) float(0.0001368522644043)
Output for 5.5.33
float(0.0022058486938477) float(0.0001521110534668)
Output for 5.5.32
float(0.0019690990447998) float(0.00013899803161621)
Output for 5.5.31
float(0.002810001373291) float(0.00025606155395508)
Output for 5.5.30
float(0.0029680728912354) float(0.00020813941955566)
Output for 5.5.29
float(0.0019700527191162) float(0.0001378059387207)
Output for 5.5.28
float(0.0025339126586914) float(0.00017595291137695)
Output for 5.5.27
float(0.0030550956726074) float(0.00021004676818848)
Output for 5.5.26
float(0.0019268989562988) float(0.00013494491577148)
Output for 5.5.25
float(0.0026729106903076) float(0.00021004676818848)
Output for 5.5.24
float(0.0027921199798584) float(0.00020194053649902)
Output for 5.4.45
float(0.0017609596252441) float(0.00012898445129395)
Output for 5.4.44
float(0.0028350353240967) float(0.00022101402282715)
Output for 5.4.43
float(0.0023398399353027) float(0.00014996528625488)
Output for 5.4.42
float(0.0019199848175049) float(0.00014615058898926)
Output for 5.4.41
float(0.0017731189727783) float(0.00013399124145508)
Output for 5.4.40
float(0.0017099380493164) float(0.00013399124145508)
Output for 5.4.39
float(0.0017211437225342) float(0.00015401840209961)
Output for 5.4.38
float(0.0017709732055664) float(0.00013399124145508)
Output for 5.4.37
float(0.0017380714416504) float(0.00013613700866699)
Output for 5.4.36
float(0.0017349720001221) float(0.00013303756713867)
Output for 5.4.35
float(0.0017080307006836) float(0.00013184547424316)
Output for 5.4.34
float(0.0027139186859131) float(0.00020694732666016)
Output for 5.4.32
float(0.0016880035400391) float(0.00012898445129395)
Output for 5.4.31
float(0.0023670196533203) float(0.00012803077697754)
Output for 5.4.30
float(0.0017170906066895) float(0.00013494491577148)
Output for 5.4.29
float(0.0032749176025391) float(0.00025701522827148)
Output for 5.4.28
float(0.0017039775848389) float(0.00013494491577148)
Output for 5.4.27
float(0.0016539096832275) float(0.00013208389282227)
Output for 5.4.26
float(0.0019819736480713) float(0.00014400482177734)
Output for 5.4.25
float(0.0016598701477051) float(0.00013995170593262)
Output for 5.4.24
float(0.0016601085662842) float(0.00013089179992676)
Output for 5.4.23
float(0.002249002456665) float(0.00018095970153809)
Output for 5.4.22
float(0.0021581649780273) float(0.0001530647277832)
Output for 5.4.21
float(0.0025920867919922) float(0.00026392936706543)
Output for 5.4.20
float(0.0016970634460449) float(0.00013303756713867)
Output for 5.4.19
float(0.0017609596252441) float(0.00014686584472656)
Output for 5.4.18
float(0.0017399787902832) float(0.00015115737915039)
Output for 5.4.17
float(0.0017139911651611) float(0.0001370906829834)
Output for 5.4.16
float(0.0017430782318115) float(0.00014495849609375)
Output for 5.4.15
float(0.0017180442810059) float(0.00013113021850586)
Output for 5.4.14
float(0.0024490356445312) float(0.00019097328186035)
Output for 5.4.13
float(0.0020260810852051) float(0.00013995170593262)
Output for 5.4.12
float(0.0021939277648926) float(0.0001521110534668)
Output for 5.4.11
float(0.0017681121826172) float(0.00013899803161621)
Output for 5.4.10
float(0.0017359256744385) float(0.00013113021850586)
Output for 5.4.9
float(0.001662015914917) float(0.00014805793762207)
Output for 5.4.8
float(0.0020270347595215) float(0.00013113021850586)
Output for 5.4.7
float(0.0020761489868164) float(0.00013399124145508)
Output for 5.4.6
float(0.0024900436401367) float(0.0001680850982666)
Output for 5.4.5
float(0.002112865447998) float(0.00013184547424316)
Output for 5.4.4
float(0.0019769668579102) float(0.00015711784362793)
Output for 5.4.3
float(0.0021200180053711) float(0.00013303756713867)
Output for 5.4.2
float(0.0021259784698486) float(0.00014805793762207)
Output for 5.4.1
float(0.0021328926086426) float(0.00014400482177734)
Output for 5.4.0
float(0.0019690990447998) float(0.00013279914855957)
Output for 5.3.29
float(0.001957893371582) float(0.00020384788513184)
Output for 5.3.28
float(0.001906156539917) float(0.00020503997802734)
Output for 5.3.27
float(0.0020251274108887) float(0.00022983551025391)
Output for 5.3.26
float(0.0019419193267822) float(0.00022292137145996)
Output for 5.3.25
float(0.0019688606262207) float(0.0002138614654541)
Output for 5.3.24
float(0.0019569396972656) float(0.00022697448730469)
Output for 5.3.23
float(0.0019989013671875) float(0.00020599365234375)
Output for 5.3.22
float(0.0017659664154053) float(0.00022983551025391)
Output for 5.3.21
float(0.0017452239990234) float(0.00021505355834961)
Output for 5.3.20
float(0.0018148422241211) float(0.00022482872009277)
Output for 5.3.19
float(0.0017518997192383) float(0.00021600723266602)
Output for 5.3.18
float(0.0019819736480713) float(0.0002129077911377)
Output for 5.3.17
float(0.0018661022186279) float(0.00022292137145996)
Output for 5.3.16
float(0.0019910335540771) float(0.00021791458129883)
Output for 5.3.15
float(0.0022368431091309) float(0.0002140998840332)
Output for 5.3.14
float(0.0019731521606445) float(0.00021600723266602)
Output for 5.3.13
float(0.0019600391387939) float(0.00023603439331055)
Output for 5.3.12
float(0.0019760131835938) float(0.00023078918457031)
Output for 5.3.11
float(0.0019948482513428) float(0.00022983551025391)
Output for 5.3.10
float(0.0020289421081543) float(0.00023102760314941)
Output for 5.3.9
float(0.0018980503082275) float(0.00022101402282715)
Output for 5.3.8
float(0.0019609928131104) float(0.00020694732666016)
Output for 5.3.7
float(0.0019700527191162) float(0.0001990795135498)
Output for 5.3.6
float(0.0020339488983154) float(0.00023102760314941)
Output for 5.3.5
float(0.0028648376464844) float(0.00028300285339355)
Output for 5.3.4
float(0.0018899440765381) float(0.00021505355834961)
Output for 5.3.3
float(0.0019180774688721) float(0.00022101402282715)
Output for 5.3.2
float(0.0018959045410156) float(0.00021791458129883)
Output for 5.3.1
float(0.0018630027770996) float(0.00022101402282715)
Output for 5.3.0
float(0.0018630027770996) float(0.00021100044250488)
Output for 5.2.17
float(0.001845121383667) float(0.00018501281738281)
Output for 5.2.16
float(0.0018889904022217) float(0.00020003318786621)
Output for 5.2.15
float(0.0018479824066162) float(0.00020694732666016)
Output for 5.2.14
float(0.0018489360809326) float(0.00018787384033203)
Output for 5.2.13
float(0.0019330978393555) float(0.00019693374633789)
Output for 5.2.12
float(0.0018560886383057) float(0.00019288063049316)
Output for 5.2.11
float(0.0017189979553223) float(0.00020694732666016)
Output for 5.2.10
float(0.0018670558929443) float(0.00020503997802734)
Output for 5.2.9
float(0.0024762153625488) float(0.00021195411682129)
Output for 5.2.8
float(0.0019431114196777) float(0.00018596649169922)
Output for 5.2.7
float(0.0018899440765381) float(0.00018596649169922)
Output for 5.2.6
float(0.0018458366394043) float(0.0001828670501709)
Output for 5.2.5
float(0.0019400119781494) float(0.00020003318786621)
Output for 5.2.4
float(0.0017678737640381) float(0.00019097328186035)
Output for 5.2.3
float(0.0018260478973389) float(0.00019001960754395)
Output for 5.2.2
float(0.0020830631256104) float(0.00018715858459473)
Output for 5.2.1
float(0.0018320083618164) float(0.00022101402282715)
Output for 5.2.0
float(0.0017309188842773) float(0.00018095970153809)
Output for 5.1.6
float(0.0018789768218994) float(0.00018215179443359)
Output for 5.1.5
float(0.0019490718841553) float(0.00016999244689941)
Output for 5.1.4
float(0.0018990039825439) float(0.00018215179443359)
Output for 5.1.3
float(0.0028018951416016) float(0.00017595291137695)
Output for 5.1.2
float(0.0018820762634277) float(0.0001678466796875)
Output for 5.1.1
float(0.0019090175628662) float(0.00017404556274414)
Output for 5.1.0
float(0.0018620491027832) float(0.00018310546875)
Output for 5.0.5
float(0.0020229816436768) float(0.00027799606323242)
Output for 5.0.4
float(0.0019030570983887) float(0.00026202201843262)
Output for 5.0.3
float(0.0018479824066162) float(0.00024604797363281)
Output for 5.0.2
float(0.0018260478973389) float(0.000244140625)
Output for 5.0.1
float(0.0019559860229492) float(0.00031399726867676)
Output for 5.0.0
float(0.0018019676208496) float(0.00026392936706543)
Output for 4.4.9
float(0.001954) float(0.00024899999999994)
Output for 4.4.8
float(0.001932) float(0.0002589999999999)
Output for 4.4.7
float(0.001905) float(0.00025299999999995)
Output for 4.4.6
float(0.002027) float(0.000278)
Output for 4.4.5
float(0.001838) float(0.00026499999999996)
Output for 4.4.4
float(0.002034) float(0.000284)
Output for 4.4.3
float(0.0020399999999999) float(0.00024599999999997)
Output for 4.4.2
float(0.0019980000000001) float(0.00028000000000006)
Output for 4.4.1
float(0.0019880000000001) float(0.00027100000000002)
Output for 4.4.0
float(0.002004) float(0.00025499999999999)
Output for 4.3.11
float(0.001728) float(0.00025699999999995)
Output for 4.3.10
float(0.001796) float(0.00023899999999999)
Output for 4.3.9
float(0.001737) float(0.00024299999999999)
Output for 4.3.8
float(0.002626) float(0.000301)
Output for 4.3.7
float(0.002102) float(0.00050899999999998)
Output for 4.3.6
float(0.0017509999999999) float(0.00025900000000001)
Output for 4.3.5
float(0.001761) float(0.000247)
Output for 4.3.4
float(0.001801) float(0.00024300000000002)
Output for 4.3.3
float(0.002187) float(0.00030599999999997)
Output for 4.3.2
float(0.002248) float(0.00031300000000001)
Output for 4.3.1
float(0.002293) float(0.00029100000000004)
Output for 4.3.0
float(0.002072) float(0.000304)