3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* How many times the code under test should run in each function */ define('LOOP',1000000); function f1() { for($i=0; $i<LOOP; ++$i) { str_replace('_', '-', 'parse-url-without-regular-expression'); } } function f2() { for($i=0; $i<LOOP; ++$i) { preg_replace('/_/', '-', 'parse-url-without-regular-expression'); } } $start = microtime(true); f1(); $stop = microtime(true); $time1 = $stop - $start; $start = microtime(true); f2(); $stop = microtime(true); $time2 = $stop - $start; echo $time1 . "\t"; echo $time2 . "\n";
Output for 7.2.0
0.04759693145752 0.13051700592041
Output for 7.1.7
0.049227952957153 0.14161109924316
Output for 7.1.6
0.083343982696533 0.12880802154541
Output for 7.1.5
0.082985162734985 0.14009308815002
Output for 7.0.20
0.043221950531006 0.11609506607056
Output for 7.0.5
0.1147129535675 0.20766806602478
Output for 7.0.4
0.075939178466797 0.2024998664856
Output for 7.0.3
0.076689004898071 0.23025894165039
Output for 7.0.2
0.073571920394897 0.21079897880554
Output for 7.0.1
0.079096794128418 0.20664596557617
Output for 7.0.0
0.12267088890076 0.21216821670532
Output for 5.6.20
0.49427103996277 1.0288028717041
Output for 5.6.19
0.33186197280884 0.59110498428345
Output for 5.6.18
0.32490396499634 0.63662195205688
Output for 5.6.17
0.3285391330719 0.54770398139954
Output for 5.6.16
0.42397499084473 0.71434593200684
Output for 5.6.15
0.36621904373169 0.71047115325928
Output for 5.6.14
0.40403485298157 0.61047315597534
Output for 5.5.34
0.35814499855042 0.65532994270325
Output for 5.5.33
0.34773182868958 0.58998012542725
Output for 5.5.32
0.31131601333618 0.535560131073
Output for 5.5.31
0.3744158744812 0.55964708328247
Output for 5.5.30
0.4163990020752 0.56001996994019
Output for 5.4.45
0.3022940158844 0.63306403160095
Output for 5.4.44
0.34424710273743 0.54980993270874
Output for 5.4.43
0.33305883407593 0.53319191932678
Output for 5.4.42
0.31642913818359 0.57694602012634
Output for 5.4.41
0.35126495361328 0.56129598617554
Output for 5.4.40
0.39215302467346 0.73837184906006
Output for 5.4.39
0.29152393341064 0.64011001586914
Output for 5.4.38
0.30936479568481 0.52893900871277
Output for 5.4.37
0.29801201820374 0.71899199485779
Output for 5.4.36
0.35118007659912 0.68217611312866
Output for 5.4.35
0.31361699104309 0.57521200180054
Output for 5.4.34
0.41179513931274 0.53785991668701
Output for 5.4.32
0.35830783843994 0.50131416320801
Output for 5.4.31
0.28920102119446 0.50768899917603
Output for 5.4.30
0.2985532283783 0.48604607582092
Output for 5.4.29
0.29241800308228 0.51116991043091
Output for 5.4.28
0.29328513145447 0.58353185653687
Output for 5.4.27
0.31765413284302 0.59963393211365
Output for 5.4.26
0.30926585197449 0.50780916213989
Output for 5.4.25
0.37251114845276 0.60730695724487
Output for 5.4.24
0.30017900466919 0.58061790466309
Output for 5.4.23
0.29997611045837 0.61720108985901
Output for 5.4.22
0.35221099853516 0.5292649269104
Output for 5.4.21
0.31922793388367 0.59602093696594
Output for 5.4.20
0.34326696395874 0.58700108528137
Output for 5.4.19
0.29736495018005 0.57706713676453
Output for 5.4.18
0.31703281402588 0.55168390274048
Output for 5.4.17
0.38487482070923 0.61221790313721
Output for 5.4.16
0.35726499557495 0.67153692245483
Output for 5.4.15
0.36014699935913 0.59454584121704
Output for 5.4.14
0.36365795135498 0.63147306442261
Output for 5.4.13
0.31983804702759 0.55391407012939
Output for 5.4.12
0.28606986999512 0.52279901504517
Output for 5.4.11
0.56602787971497 0.59455490112305
Output for 5.4.10
0.33402514457703 0.69087386131287
Output for 5.4.9
0.4213969707489 0.72807002067566
Output for 5.4.8
0.36609387397766 0.58304715156555
Output for 5.4.7
0.36079096794128 0.60283398628235
Output for 5.4.6
0.44139409065247 0.8298978805542
Output for 5.4.5
0.31320405006409 0.56688284873962
Output for 5.4.4
0.34280705451965 0.57183003425598
Output for 5.4.3
0.37164688110352 0.67604112625122
Output for 5.4.2
0.42980790138245 0.58391404151917
Output for 5.4.1
0.33095908164978 0.61993193626404
Output for 5.4.0
0.32376503944397 0.60387396812439
Output for 5.3.29
0.40341591835022 0.61669301986694
Output for 5.3.28
0.44297313690186 0.72857213020325
Output for 5.3.27
0.46199798583984 0.65691590309143
Output for 5.3.26
0.47359919548035 0.74335694313049
Output for 5.3.25
0.66040682792664 0.94467997550964
Output for 5.3.24
0.63332080841064 1.12566614151
Output for 5.3.23
0.37608098983765 0.67325496673584
Output for 5.3.22
0.45828914642334 0.74083805084229
Output for 5.3.21
0.51860213279724 0.71598315238953
Output for 5.3.20
0.45331120491028 0.65953397750854
Output for 5.3.19
0.44451785087585 0.74360203742981
Output for 5.3.18
0.43600296974182 0.67073702812195
Output for 5.3.17
0.47955703735352 0.89144682884216
Output for 5.3.16
0.51490497589111 0.76780819892883
Output for 5.3.15
0.43856501579285 0.71779608726501
Output for 5.3.14
0.52573990821838 1.2719268798828
Output for 5.3.13
0.77395915985107 0.77666306495667
Output for 5.3.12
0.69832801818848 1.2411360740662
Output for 5.3.11
0.47632193565369 0.99614119529724
Output for 5.3.10
0.54876613616943 0.79916906356812
Output for 5.3.9
0.67811584472656 0.80668306350708
Output for 5.3.8
0.52763819694519 0.86476588249207
Output for 5.3.7
0.62541508674622 0.94334602355957
Output for 5.3.6
0.86152911186218 1.1010680198669
Output for 5.3.1, 5.3.4 - 5.3.5

Process exited with code 137.
Output for 5.3.3
Could not open input file: /in/BYN5q
Process exited with code 1.
Output for 5.3.2
1.1797490119934 1.0485310554504
Output for 5.3.0
0.8050000667572 1.3047270774841