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() { $var = NULL; for($i=0; $i<LOOP; ++$i) { $var = 'test'.'123'.'string'; } } function f2() { $var = NULL; for($i=0; $i<LOOP; ++$i) { $var = sprintf('test%sstring', 123); } } $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.1.0
0.018728971481323 0.11546301841736
Output for 7.0.14
0.018485069274902 0.11068201065063
Output for 7.0.6
0.011502981185913 0.086008071899414
Output for 7.0.5
0.017156839370728 0.090183019638062
Output for 7.0.4
0.01472282409668 0.090713024139404
Output for 7.0.3
0.012823820114136 0.082494020462036
Output for 7.0.2
0.011494874954224 0.082365036010742
Output for 7.0.1
0.013962030410767 0.08818793296814
Output for 7.0.0
0.010799884796143 0.079073190689087
Output for 5.6.28
0.11138606071472 0.20828604698181
Output for 5.6.21
0.096345186233521 0.24047994613647
Output for 5.6.20
0.072904109954834 0.20236301422119
Output for 5.6.19
0.072839975357056 0.21228694915771
Output for 5.6.18
0.087967157363892 0.20556688308716
Output for 5.6.17
0.070273876190186 0.20243692398071
Output for 5.6.16
0.083199977874756 0.20173692703247
Output for 5.6.15
0.095845937728882 0.20839595794678
Output for 5.6.14
0.073799133300781 0.2083261013031
Output for 5.6.13
0.089289903640747 0.21387195587158
Output for 5.6.12
0.089991092681885 0.20423889160156
Output for 5.6.11
0.077889919281006 0.20366501808167
Output for 5.6.10
0.069581031799316 0.20512390136719
Output for 5.6.9
0.080744981765747 0.20471906661987
Output for 5.6.8
0.084314107894897 0.20388197898865
Output for 5.6.7
0.065775156021118 0.2026538848877
Output for 5.5.35
0.092474937438965 0.21093511581421
Output for 5.5.34
0.09249210357666 0.21279096603394
Output for 5.5.33
0.070127010345459 0.21105694770813
Output for 5.5.32
0.075229167938232 0.20799493789673
Output for 5.5.31
0.086215019226074 0.20808100700378
Output for 5.5.30
0.082566022872925 0.25299382209778
Output for 5.5.29
0.072736024856567 0.21210098266602
Output for 5.5.28
0.091052055358887 0.21021890640259
Output for 5.5.27
0.08991003036499 0.2103431224823
Output for 5.5.26
0.08244800567627 0.21065902709961
Output for 5.5.25
0.09083104133606 0.20740103721619
Output for 5.5.24
0.082524061203003 0.2145140171051
Output for 5.4.45
0.063954830169678 0.52139091491699
Output for 5.4.44
0.22759199142456 0.58539390563965
Output for 5.4.43
0.11055898666382 0.59944295883179
Output for 5.4.42
0.090349197387695 0.51409006118774
Output for 5.4.41
0.10999178886414 0.4767439365387
Output for 5.4.40
0.080971002578735 0.26509594917297
Output for 5.4.39
0.095328092575073 0.45461583137512
Output for 5.4.38
0.12475109100342 0.44882607460022
Output for 5.4.37
0.18457794189453 0.56192994117737
Output for 5.4.36
0.12063097953796 0.35616087913513
Output for 5.4.35
0.12029886245728 0.34422302246094
Output for 5.4.34
0.12433981895447 0.34795212745667
Output for 5.4.32
0.12174987792969 0.28283095359802
Output for 5.4.31
0.14879107475281 0.29306602478027
Output for 5.4.30
0.081243991851807 0.30290412902832
Output for 5.4.29
0.089131116867065 0.26751017570496
Output for 5.4.28
0.081722974777222 0.27100014686584
Output for 5.4.27
0.094797134399414 0.28714299201965
Output for 5.4.26
0.096063137054443 0.31958699226379
Output for 5.4.25
0.08020806312561 0.25989294052124
Output for 5.4.24
0.081785917282104 0.26875114440918
Output for 5.4.23
0.081058979034424 0.24756121635437
Output for 5.4.22
0.093346118927002 0.3702609539032
Output for 5.4.21
0.090067148208618 0.31705808639526
Output for 5.4.20
0.10645198822021 0.3152129650116
Output for 5.4.19
0.092201948165894 0.2576949596405
Output for 5.4.18
0.083950996398926 0.27688097953796
Output for 5.4.17
0.082762956619263 0.26095104217529
Output for 5.4.16
0.12522888183594 0.31070590019226
Output for 5.4.15
0.081280946731567 0.26379609107971
Output for 5.4.14
0.081801891326904 0.24915599822998
Output for 5.4.13
0.085839033126831 0.28591179847717
Output for 5.4.12
0.089060068130493 0.29775500297546
Output for 5.4.11
0.089066982269287 0.43107986450195
Output for 5.4.10
0.10323882102966 0.29778695106506
Output for 5.4.9
0.091708898544312 0.27260613441467
Output for 5.4.8
0.11000800132751 0.27558183670044
Output for 5.4.7
0.10657596588135 0.28308391571045
Output for 5.4.6
0.087469100952148 0.26438307762146
Output for 5.4.5
0.11349701881409 0.28635501861572
Output for 5.4.4
0.08729100227356 0.27851891517639
Output for 5.4.3
0.086178064346313 0.26150393486023
Output for 5.4.2
0.086848974227905 0.2695050239563
Output for 5.4.1
0.085242986679077 0.25773310661316
Output for 5.4.0
0.085896968841553 0.25703692436218
Output for 5.3.29
0.13381409645081 0.29726886749268
Output for 5.3.28
0.10531210899353 0.28894996643066
Output for 5.3.27
0.10846304893494 0.29841017723083
Output for 5.3.26
0.12753081321716 0.33509516716003
Output for 5.3.25
0.10734105110168 0.29262399673462
Output for 5.3.24
0.10647106170654 0.31196403503418
Output for 5.3.23
0.10352396965027 0.28736305236816
Output for 5.3.22
0.11031317710876 0.30048608779907
Output for 5.3.21
0.11576890945435 0.32421684265137
Output for 5.3.20
0.1527361869812 0.32238793373108
Output for 5.3.19
0.10935688018799 0.32755994796753
Output for 5.3.18
0.1063859462738 0.32076811790466
Output for 5.3.17
0.1143810749054 0.33988285064697
Output for 5.3.16
0.10466599464417 0.34117293357849
Output for 5.3.15
0.10459494590759 0.33542323112488
Output for 5.3.14
0.10957884788513 0.32691597938538
Output for 5.3.13
0.11066007614136 0.30574297904968
Output for 5.3.12
0.11246991157532 0.33186602592468
Output for 5.3.11
0.11133289337158 0.32729005813599
Output for 5.3.10
0.15105795860291 0.34202098846436
Output for 5.3.9
0.11170101165771 0.31183314323425
Output for 5.3.8
0.11171197891235 0.34710288047791
Output for 5.3.7
0.11276602745056 0.29514789581299
Output for 5.3.6
0.11359691619873 0.34731292724609
Output for 5.3.5
0.11011910438538 0.33855795860291
Output for 5.3.4
0.10695910453796 0.34656000137329
Output for 5.3.3
0.11138319969177 0.32711100578308
Output for 5.3.2
0.10889101028442 0.31410717964172
Output for 5.3.1
0.11537408828735 0.30379390716553
Output for 5.3.0
0.12479710578918 0.33415412902832
Output for 5.2.17
0.16080284118652 0.41731309890747
Output for 5.2.16
0.12824010848999 0.31879496574402
Output for 5.2.15
0.14187908172607 0.34661483764648
Output for 5.2.14
0.12998604774475 0.38455414772034
Output for 5.2.13
0.1291708946228 0.3232250213623
Output for 5.2.12
0.17360401153564 0.32166194915771
Output for 5.2.11
0.12987899780273 0.39316391944885
Output for 5.2.10
0.12782096862793 0.44064211845398
Output for 5.2.9
0.1281909942627 0.33485913276672
Output for 5.2.8
0.1361300945282 0.30907082557678
Output for 5.2.7
0.12760496139526 0.3183970451355
Output for 5.2.6
0.12556195259094 0.31010103225708
Output for 5.2.5
0.12925887107849 0.32636404037476
Output for 5.2.4
0.12947416305542 0.37393307685852
Output for 5.2.3
0.12624597549438 0.39128398895264
Output for 5.2.2
0.12988591194153 0.3180239200592
Output for 5.2.1
0.14463996887207 0.39333295822144
Output for 5.2.0
0.14457607269287 0.35867285728455
Output for 5.1.6
0.13804697990417 0.46605706214905
Output for 5.1.5
0.16351389884949 0.52174377441406
Output for 5.1.4
0.14554381370544 0.45883417129517
Output for 5.1.3
0.156898021698 0.48892617225647
Output for 5.1.2
0.13502717018127 0.4286208152771
Output for 5.1.1
0.14164590835571 0.4228241443634
Output for 5.1.0
0.13260698318481 0.53457021713257
Output for 5.0.5
0.23938703536987 0.55150389671326
Output for 5.0.4
0.28443288803101 0.61912202835083
Output for 5.0.3
0.2493040561676 0.61075401306152
Output for 5.0.2
0.22575807571411 0.59569501876831
Output for 5.0.1
0.26854300498962 0.71712207794189
Output for 5.0.0
0.24821090698242 0.66852593421936
Output for 4.4.9
0.291225 -0.293886
Output for 4.4.8
0.257625 0.572322
Output for 4.4.7
-0.696334 0.582418
Output for 4.4.6
-0.69301 0.637721
Output for 4.4.5
-0.740315 0.624307
Output for 4.4.4
-0.714809 0.680657
Output for 4.4.3
-0.756234 0.578033
Output for 4.4.2
0.251378 -0.431619
Output for 4.4.1
0.248001 -0.423911
Output for 4.4.0
0.277797 -0.33796
Output for 4.3.11
0.263606 -0.395789
Output for 4.3.10
0.281555 -0.245958
Output for 4.3.9
0.268598 -0.338173
Output for 4.3.8
0.248572 -0.452792
Output for 4.3.7
0.265738 0.620766
Output for 4.3.6
-0.721911 0.668975
Output for 4.3.5
-0.753752 0.547092
Output for 4.3.4
0.271029 -0.360851
Output for 4.3.3
0.286451 -0.382345
Output for 4.3.2
0.269088 -0.385589
Output for 4.3.1
0.260736 -0.436746
Output for 4.3.0
0.307372 0.285906