3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /* How many times the code under test should run in each function */ define('LOOP',1000000); function f1(&$md5) { $path = NULL; $yy = date('y'); $ab = substr($md5, 0, 2); $cd = substr($md5, 2, 2); for($i=0; $i<LOOP; ++$i) { $path = 'some' . '/'; $path .= $yy . '/'; $path .= $ab . '/'; $path .= $cd . '/'; } } function f2(&$md5) { $path = NULL; $yy = date('y'); $ab = substr($md5, 0, 2); $cd = substr($md5, 2, 2); for($i=0; $i<LOOP; ++$i) { $path = sprintf('%s/%s/%s/%s', 'some', $yy, $ab, $cd); } } $md5 = md5(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')); $start = microtime(true); f1($md5); $stop = microtime(true); $time1 = $stop - $start; $start = microtime(true); f2($md5); $stop = microtime(true); $time2 = $stop - $start; echo $time1 . "\t"; echo $time2 . "\n";
Output for 7.1.0
0.14159512519836 0.023983001708984
Output for 7.0.14
0.16493797302246 0.10707688331604
Output for 7.0.11
0.17451310157776 0.09958291053772
Output for 7.0.10
0.158851146698 0.1143651008606
Output for 7.0.9
0.15279102325439 0.098219871520996
Output for 7.0.8
0.12583589553833 0.098803997039795
Output for 7.0.7
0.15974593162537 0.098657846450806
Output for 7.0.6
0.13191914558411 0.099196910858154
Output for 7.0.5
0.14986300468445 0.10695290565491
Output for 7.0.4
0.13558983802795 0.098127126693726
Output for 7.0.3
0.14389896392822 0.099053144454956
Output for 7.0.2
0.12670493125916 0.095825910568237
Output for 7.0.1
0.12251305580139 0.081794023513794
Output for 7.0.0
0.11857891082764 0.082050085067749
Output for hhvm-3.13.2
0.37924599647522 0.57893586158752
Output for hhvm-3.12.0
0.36902403831482 0.41732907295227
Output for hhvm-3.10.0
0.44255805015564 0.5016930103302
Output for 5.6.28
0.25356316566467 0.34790301322937
Output for 5.6.26
0.183100938797 0.31681704521179
Output for 5.6.25
0.17050409317017 0.28523421287537
Output for 5.6.24
0.17552280426025 0.30944991111755
Output for 5.6.23
0.17704796791077 0.25746297836304
Output for 5.6.22
0.16295289993286 0.27747797966003
Output for 5.6.21
0.18523907661438 0.30463194847107
Output for 5.6.20
0.19842195510864 0.31215405464172
Output for 5.6.19
0.19279289245605 0.30203008651733
Output for 5.6.18
0.19052791595459 0.3018639087677
Output for 5.6.17
0.18103122711182 0.3078019618988
Output for 5.6.16
0.19637012481689 0.27994298934937
Output for 5.6.15
0.21980094909668 0.29581999778748
Output for 5.6.14
0.15046501159668 0.26239204406738
Output for 5.6.13
0.15318608283997 0.25787401199341
Output for 5.6.12
0.14599800109863 0.26710200309753
Output for 5.6.11
0.18280601501465 0.29896306991577
Output for 5.6.10
0.17688894271851 0.26216912269592
Output for 5.6.9
0.1788330078125 0.31469511985779
Output for 5.6.8
0.19902610778809 0.32620692253113
Output for 5.6.7
0.1456880569458 0.25710105895996
Output for 5.6.6
0.18647384643555 0.31900501251221
Output for 5.6.5
0.20651006698608 0.30631279945374
Output for 5.6.4
0.15170979499817 0.27518200874329
Output for 5.6.3
0.16760492324829 0.26045608520508
Output for 5.6.2
0.183434009552 0.30185484886169
Output for 5.6.1
0.1978611946106 0.29137492179871
Output for 5.6.0
0.21001601219177 0.30259299278259
Output for 5.5.38
0.18814086914062 0.33245706558228
Output for 5.5.37
0.18333911895752 0.35927319526672
Output for 5.5.36
0.19384503364563 0.33803796768188
Output for 5.5.35
0.23411893844604 0.31840920448303
Output for 5.5.34
0.20343804359436 0.31916785240173
Output for 5.5.33
0.18277502059937 0.3503041267395
Output for 5.5.32
0.16105818748474 0.28836703300476
Output for 5.5.31
0.16167116165161 0.32826709747314
Output for 5.5.30
0.17647504806519 0.2803590297699
Output for 5.5.29
0.14739680290222 0.26815485954285
Output for 5.5.28
0.14558005332947 0.26385498046875
Output for 5.5.27
0.17919301986694 0.32302689552307
Output for 5.5.26
0.15675592422485 0.2870831489563
Output for 5.5.25
0.15475010871887 0.28567314147949
Output for 5.5.24
0.20126104354858 0.33051085472107
Output for 5.5.23
0.20999789237976 0.34184598922729
Output for 5.5.22
0.15220499038696 0.27924108505249
Output for 5.5.21
0.14807486534119 0.27415919303894
Output for 5.5.20
0.17386698722839 0.31421089172363
Output for 5.5.19
0.19157314300537 0.29083704948425
Output for 5.5.18
0.18128609657288 0.31806898117065
Output for 5.5.16
0.19337606430054 0.31515502929688
Output for 5.5.15
0.16832900047302 0.31491208076477
Output for 5.5.14
0.18026995658875 0.32172799110413
Output for 5.5.13
0.20847988128662 0.31486392021179
Output for 5.5.12
0.18064904212952 0.33007097244263
Output for 5.5.11
0.20857310295105 0.33937001228333
Output for 5.5.10
0.21175003051758 0.35218811035156
Output for 5.5.9
0.19791913032532 0.33129620552063
Output for 5.5.8
0.18513202667236 0.36712503433228
Output for 5.5.7
0.17659592628479 0.27553296089172
Output for 5.5.6
0.14259099960327 0.27021598815918
Output for 5.5.5
0.17245006561279 0.28780317306519
Output for 5.5.4
0.18563485145569 0.33210587501526
Output for 5.5.3
0.18032598495483 0.3317768573761
Output for 5.5.2
0.18760800361633 0.31626796722412
Output for 5.5.1
0.1682460308075 0.36644601821899
Output for 5.5.0
0.15409398078918 0.29270195960999
Output for 5.4.45
0.14244389533997 0.27537488937378
Output for 5.4.44
0.15612292289734 0.26367616653442
Output for 5.4.43
0.15668821334839 0.30778694152832
Output for 5.4.42
0.16144800186157 0.29143214225769
Output for 5.4.41
0.22071218490601 0.30893802642822
Output for 5.4.40
0.20027995109558 0.3147611618042
Output for 5.4.39
0.15954113006592 0.28641295433044
Output for 5.4.38
0.18118000030518 0.317302942276
Output for 5.4.37
0.18005204200745 0.2661280632019
Output for 5.4.36
0.15275311470032 0.27621793746948
Output for 5.4.35
0.15163588523865 0.28725981712341
Output for 5.4.34
0.19081377983093 0.31565999984741
Output for 5.4.32
0.18757891654968 0.32500696182251
Output for 5.4.31
0.16648411750793 0.29107713699341
Output for 5.4.30
0.2062668800354 0.3267810344696
Output for 5.4.29
0.1874828338623 0.32876491546631
Output for 5.4.28
0.18535590171814 0.34201383590698
Output for 5.4.27
0.20490694046021 0.33001613616943
Output for 5.4.26
0.1965479850769 0.3318829536438
Output for 5.4.25
0.15082788467407 0.33650779724121
Output for 5.4.24
0.16390109062195 0.33039593696594
Output for 5.4.23
0.17696404457092 0.32708597183228
Output for 5.4.22
0.17349290847778 0.32510995864868
Output for 5.4.21
0.21909785270691 0.33431100845337
Output for 5.4.20
0.15049481391907 0.2959680557251
Output for 5.4.19
0.15398907661438 0.29896521568298
Output for 5.4.18
0.13968205451965 0.26679611206055
Output for 5.4.17
0.17932200431824 0.32726907730103
Output for 5.4.16
0.19706082344055 0.32567191123962
Output for 5.4.15
0.16250085830688 0.29787397384644
Output for 5.4.14
0.20388412475586 0.3285129070282
Output for 5.4.13
0.21357798576355 0.32954883575439
Output for 5.4.12
0.16712403297424 0.32978200912476
Output for 5.4.11
0.17996501922607 0.35247611999512
Output for 5.4.10
0.18026304244995 0.32957410812378
Output for 5.4.9
0.21161293983459 0.33932018280029
Output for 5.4.8
0.17988109588623 0.28176808357239
Output for 5.4.7
0.14033007621765 0.29393696784973
Output for 5.4.6
0.16099691390991 0.27476787567139
Output for 5.4.5
0.13567590713501 0.28529405593872
Output for 5.4.4
0.13665819168091 0.27448296546936
Output for 5.4.3
0.16959381103516 0.33041477203369
Output for 5.4.2
0.22735214233398 0.37711381912231
Output for 5.4.1
0.20614790916443 0.32695293426514
Output for 5.4.0
0.18436694145203 0.34269785881042
Output for 5.3.29
0.22590589523315 0.36463284492493
Output for 5.3.28
0.18517899513245 0.35230588912964
Output for 5.3.27
0.21041989326477 0.33663296699524
Output for 5.3.26
0.19269895553589 0.40440988540649
Output for 5.3.25
0.20209288597107 0.38145899772644
Output for 5.3.24
0.20189690589905 0.37591600418091
Output for 5.3.23
0.22122502326965 0.39585089683533
Output for 5.3.22
0.21941184997559 0.38330292701721
Output for 5.3.21
0.22638702392578 0.39782094955444
Output for 5.3.20
0.21882319450378 0.3800220489502
Output for 5.3.19
0.19929003715515 0.39563298225403
Output for 5.3.18
0.19490194320679 0.31250596046448
Output for 5.3.17
0.17903709411621 0.3393189907074
Output for 5.3.16
0.17106986045837 0.31701898574829
Output for 5.3.15
0.1796989440918 0.31173515319824
Output for 5.3.14
0.16557908058167 0.31745409965515
Output for 5.3.13
0.21363806724548 0.37844395637512
Output for 5.3.12
0.21658396720886 0.41232895851135
Output for 5.3.11
0.20608305931091 0.40606093406677
Output for 5.3.10
0.20472192764282 0.37511110305786
Output for 5.3.9
0.20751905441284 0.38375997543335
Output for 5.3.8
0.20068097114563 0.43689703941345
Output for 5.3.7
0.19885993003845 0.4084358215332
Output for 5.3.6
0.21563696861267 0.38589596748352
Output for 5.3.5
0.23126101493835 0.38284707069397
Output for 5.3.4
0.19485592842102 0.38310194015503
Output for 5.3.3
0.23158884048462 0.40053200721741
Output for 5.3.2
0.1969268321991 0.37363195419312
Output for 5.3.1
0.22537899017334 0.38940405845642
Output for 5.3.0
0.20630884170532 0.37889194488525
Output for 5.2.17
0.25755715370178 0.38664412498474
Output for 5.2.16
0.23402810096741 0.39648914337158
Output for 5.2.15
0.25265908241272 0.39444613456726
Output for 5.2.14
0.23127698898315 0.42563414573669
Output for 5.2.13
0.22461009025574 0.40645503997803
Output for 5.2.12
0.23890900611877 0.39268517494202
Output for 5.2.11
0.2593629360199 0.39843583106995
Output for 5.2.10
0.25220489501953 0.40140295028687
Output for 5.2.9
0.21993899345398 0.40525317192078
Output for 5.2.8
0.2246789932251 0.40784192085266
Output for 5.2.7
0.25049686431885 0.39252710342407
Output for 5.2.6
0.25835490226746 0.38627815246582
Output for 5.2.5
0.22953486442566 0.4195511341095
Output for 5.2.4
0.26459288597107 0.40585398674011
Output for 5.2.3
0.22818684577942 0.40012288093567
Output for 5.2.2
0.23142790794373 0.40551900863647
Output for 5.2.1
0.21917295455933 0.41307687759399
Output for 5.2.0
0.24896717071533 0.36972093582153
Output for 5.1.6
0.34952402114868 0.47809600830078
Output for 5.1.5
0.34505105018616 0.4747941493988
Output for 5.1.4
0.339271068573 0.44725894927979
Output for 5.1.3
0.31603002548218 0.38917684555054
Output for 5.1.2
0.41166806221008 0.42813301086426
Output for 5.1.1
0.33583498001099 0.46146607398987
Output for 5.1.0
0.37566804885864 0.43550610542297
Output for 5.0.5
0.5976288318634 0.6810200214386
Output for 5.0.4
0.58956003189087 0.70320606231689
Output for 5.0.3
0.55727791786194 0.59299898147583
Output for 5.0.2
0.59754014015198 0.6401629447937
Output for 5.0.1
0.49494194984436 0.55264902114868
Output for 5.0.0
0.45285296440125 0.53080701828003
Output for 4.4.9
0.561065 -0.436069
Output for 4.4.8
0.557699 -0.392246
Output for 4.4.7
0.507855 0.4808
Output for 4.4.6
0.553671 -0.462252
Output for 4.4.5
0.534977 -0.506709
Output for 4.4.4
0.648558 -0.457517
Output for 4.4.3
0.553296 -0.462815
Output for 4.4.2
0.57763 -0.461817
Output for 4.4.1
0.553948 -0.405026
Output for 4.4.0
0.56139 -0.458206
Output for 4.3.11
0.545751 -0.4054
Output for 4.3.10
0.588099 -0.436806
Output for 4.3.9
0.550268 -0.446148
Output for 4.3.8
0.492517 0.489477
Output for 4.3.7
0.452827 0.506779
Output for 4.3.6
0.566791 -0.368707
Output for 4.3.5
0.55458 -0.439885
Output for 4.3.4
0.559144 -0.522085
Output for 4.3.3
0.572572 0.419678
Output for 4.3.2
0.430674 0.42138
Output for 4.3.1
0.570733 -0.543246
Output for 4.3.0
0.48936 0.46785