3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = 2; $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { list($a, $b) = [$b, $a]; } echo microtime(true) - $time . PHP_EOL; $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { $t = $a; $a = $b; $b = $t; } echo microtime(true) - $time . PHP_EOL;
Output for 7.4.0
0.14167499542236 0.045274972915649
Output for 7.3.12
0.16270589828491 0.043223142623901
Output for 7.3.11
0.13070297241211 0.047224998474121
Output for 7.3.10
0.1000828742981 0.034816980361938
Output for 7.3.9
0.15472292900085 0.038877964019775
Output for 7.3.8
0.097999811172485 0.048938989639282
Output for 7.3.7
0.11410403251648 0.035773992538452
Output for 7.3.6
0.092390775680542 0.03369402885437
Output for 7.3.5
0.098455905914307 0.046673059463501
Output for 7.3.4
0.092029809951782 0.034435033798218
Output for 7.3.3
0.090427875518799 0.03241491317749
Output for 7.3.2
0.089967012405396 0.032466888427734
Output for 7.3.1
0.098212957382202 0.038928985595703
Output for 7.3.0
0.087729930877686 0.031614065170288
Output for 7.2.25
0.11578702926636 0.034121990203857
Output for 7.2.24
0.11281108856201 0.039202928543091
Output for 7.2.23
0.10235905647278 0.033596992492676
Output for 7.2.22
0.13775706291199 0.041014909744263
Output for 7.2.21
0.10925698280334 0.042893171310425
Output for 7.2.20
0.12914896011353 0.036535978317261
Output for 7.2.19
0.096673965454102 0.032898187637329
Output for 7.2.18
0.1004810333252 0.048310995101929
Output for 7.2.17
0.12151789665222 0.033721923828125
Output for 7.2.13
0.11941313743591 0.042556762695312
Output for 7.2.12
0.10544919967651 0.033890008926392
Output for 7.2.11
0.1125020980835 0.04276180267334
Output for 7.2.10
0.11951994895935 0.036440134048462
Output for 7.2.9
0.1308069229126 0.036614179611206
Output for 7.2.8
0.11301898956299 0.045979022979736
Output for 7.2.7
0.10896301269531 0.036064147949219
Output for 7.2.6
0.11583995819092 0.033982038497925
Output for 7.2.5
0.12655901908875 0.037290096282959
Output for 7.2.4
0.10085296630859 0.040485858917236
Output for 7.2.3
0.11232495307922 0.037781000137329
Output for 7.2.2
0.11431980133057 0.036054849624634
Output for 7.2.1
0.11033391952515 0.036294937133789
Output for 7.2.0
0.10785794258118 0.036391019821167
Output for 7.1.33
0.17505407333374 0.056838035583496
Output for 7.1.32
0.18054413795471 0.060934066772461
Output for 7.1.31
0.15483808517456 0.059639930725098
Output for 7.1.30
0.15057897567749 0.052957057952881
Output for 7.1.29
0.14859199523926 0.051270961761475
Output for 7.1.28
0.175940990448 0.055155992507935
Output for 7.1.27
0.16027283668518 0.059046030044556
Output for 7.1.26
0.14511299133301 0.054734945297241
Output for 7.1.25
0.17029094696045 0.05249810218811
Output for 7.1.11
0.12469911575317 0.041101932525635
Output for 7.1.10
0.11960506439209 0.042875051498413
Output for 7.1.9
0.13014197349548 0.050100088119507
Output for 7.1.8
0.1318781375885 0.04532790184021
Output for 7.1.7
0.062760829925537 0.015424966812134
Output for 7.1.6
0.10325789451599 0.017035007476807
Output for 7.1.5
0.10893392562866 0.017288208007812
Output for 7.1.4
0.11368703842163 0.020255088806152
Output for 7.1.3
0.076332092285156 0.018604040145874
Output for 7.1.2
0.10397005081177 0.016501903533936
Output for 7.1.1
0.065215110778809 0.015867948532104
Output for 7.1.0
0.065791130065918 0.015629053115845
Output for 7.0.25
0.13706207275391 0.04987907409668
Output for 7.0.24
0.12150287628174 0.043881893157959
Output for 7.0.23
0.12768697738647 0.050368070602417
Output for 7.0.22
0.12431502342224 0.043938875198364
Output for 7.0.21
0.19515109062195 0.053255081176758
Output for 7.0.20
0.07194995880127 0.017230033874512
Output for 7.0.19
0.096166133880615 0.016578912734985
Output for 7.0.18
0.07558798789978 0.017169952392578
Output for 7.0.17
0.065855026245117 0.016438007354736
Output for 7.0.16
0.06441593170166 0.018517017364502
Output for 7.0.15
0.10100507736206 0.018188953399658
Output for 7.0.14
0.062443971633911 0.016064882278442
Output for 7.0.13
0.092545986175537 0.017650127410889
Output for 7.0.12
0.064968109130859 0.016676902770996
Output for 7.0.11
0.063588857650757 0.016584157943726
Output for 7.0.10
0.063498973846436 0.030834913253784
Output for 7.0.9
0.10011100769043 0.016233921051025
Output for 7.0.8
0.065483093261719 0.016336917877197
Output for 7.0.7
0.083076000213623 0.022576093673706
Output for 7.0.6
0.067425966262817 0.017289876937866
Output for 7.0.5
0.06874680519104 0.016351938247681
Output for 7.0.4
0.076129913330078 0.02799916267395
Output for 7.0.3
0.11587905883789 0.024526119232178
Output for 7.0.2
0.071907043457031 0.019335985183716
Output for 7.0.1
0.078252077102661 0.016196012496948
Output for 7.0.0
0.073170185089111 0.018327951431274
Output for 5.6.30
0.14217686653137 0.039799928665161
Output for 5.6.29
0.19758892059326 0.040361881256104
Output for 5.6.28
0.1402370929718 0.040612936019897
Output for 5.6.27
0.15972280502319 0.04020619392395
Output for 5.6.26
0.14136600494385 0.041510105133057
Output for 5.6.25
0.14573383331299 0.04734992980957
Output for 5.6.24
0.16381192207336 0.040591955184937
Output for 5.6.23
0.17975306510925 0.04427695274353
Output for 5.6.22
0.14038920402527 0.03899884223938
Output for 5.6.21
0.16631412506104 0.043155908584595
Output for 5.6.20
0.16212916374207 0.03972601890564
Output for 5.6.19
0.13854193687439 0.03938102722168
Output for 5.6.18
0.18995904922485 0.042514085769653
Output for 5.6.17
0.1482629776001 0.045865774154663
Output for 5.6.16
0.17603993415833 0.041558980941772
Output for 5.6.15
0.15889883041382 0.049274921417236
Output for 5.6.14
0.14297318458557 0.038506984710693
Output for 5.6.13
0.14304709434509 0.049032926559448
Output for 5.6.12
0.17275595664978 0.043986082077026
Output for 5.6.11
0.21538305282593 0.055930852890015
Output for 5.6.10
0.13643002510071 0.040913820266724
Output for 5.6.9
0.16082382202148 0.045400142669678
Output for 5.6.8
0.12788796424866 0.039915084838867
Output for 5.6.7
0.1504430770874 0.045514106750488
Output for 5.6.6
0.14488816261292 0.049805164337158
Output for 5.6.5
0.13503813743591 0.045161962509155
Output for 5.6.4
0.16995191574097 0.053910970687866
Output for 5.6.3
0.15187501907349 0.040209054946899
Output for 5.6.2
0.14049291610718 0.043194055557251
Output for 5.6.1
0.17118787765503 0.039702892303467
Output for 5.6.0
0.13245701789856 0.043148994445801
Output for 5.5.38
0.15255689620972 0.040297031402588
Output for 5.5.37
0.15310597419739 0.050718069076538
Output for 5.5.36
0.13937902450562 0.040938854217529
Output for 5.5.35
0.1467399597168 0.04674506187439
Output for 5.5.34
0.13792514801025 0.040059089660645
Output for 5.5.33
0.15022706985474 0.040599822998047
Output for 5.5.32
0.15046906471252 0.047384977340698
Output for 5.5.31
0.14382600784302 0.046011924743652
Output for 5.5.30
0.13387489318848 0.041014909744263
Output for 5.5.29
0.15829205513 0.038773059844971
Output for 5.5.28
0.14076995849609 0.039808034896851
Output for 5.5.27
0.18395805358887 0.03975510597229
Output for 5.5.26
0.14541983604431 0.040215015411377
Output for 5.5.25
0.14462399482727 0.042619228363037
Output for 5.5.24
0.16236901283264 0.045819997787476
Output for 5.5.23
0.17166519165039 0.049685001373291
Output for 5.5.22
0.14613318443298 0.048013925552368
Output for 5.5.21
0.1503050327301 0.045017957687378
Output for 5.5.20
0.13888597488403 0.045109033584595
Output for 5.5.19
0.14934611320496 0.045553922653198
Output for 5.5.18
0.1443829536438 0.042149066925049
Output for 5.5.16
0.15437388420105 0.047542095184326
Output for 5.5.15
0.15092515945435 0.049118995666504
Output for 5.5.14
0.1517071723938 0.039767980575562
Output for 5.5.13
0.17206597328186 0.042886972427368
Output for 5.5.12
0.15532898902893 0.039575099945068
Output for 5.5.11
0.13283395767212 0.040838003158569
Output for 5.5.10
0.13744211196899 0.044124126434326
Output for 5.5.9
0.13356304168701 0.040754079818726
Output for 5.5.8
0.14896893501282 0.04029393196106
Output for 5.5.7
0.1693389415741 0.048666954040527
Output for 5.5.6
0.14419507980347 0.038990020751953
Output for 5.5.5
0.17361998558044 0.041170120239258
Output for 5.5.4
0.13728404045105 0.045654058456421
Output for 5.5.3
0.13081097602844 0.039309978485107
Output for 5.5.2
0.14245009422302 0.047727108001709
Output for 5.5.1
0.16350793838501 0.04072904586792
Output for 5.5.0
0.13523411750793 0.041038990020752
Output for 5.4.45
0.15276193618774 0.04438591003418
Output for 5.4.44
0.170823097229 0.042119979858398
Output for 5.4.43
0.14311504364014 0.043501138687134
Output for 5.4.42
0.16189503669739 0.040209054946899
Output for 5.4.41
0.17264008522034 0.039242029190063
Output for 5.4.40
0.15935301780701 0.048967838287354
Output for 5.4.39
0.15488600730896 0.041819095611572
Output for 5.4.38
0.13727998733521 0.044463872909546
Output for 5.4.37
0.15540218353271 0.046386003494263
Output for 5.4.36
0.14281606674194 0.044223070144653
Output for 5.4.35
0.1451780796051 0.043282032012939
Output for 5.4.34
0.17473816871643 0.041482925415039
Output for 5.4.32
0.1570520401001 0.043098211288452
Output for 5.4.31
0.15662598609924 0.038898944854736
Output for 5.4.30
0.15953993797302 0.039577007293701
Output for 5.4.29
0.17802214622498 0.045569181442261
Output for 5.4.28
0.17147207260132 0.042162179946899
Output for 5.4.27
0.13211798667908 0.038625001907349
Output for 5.4.26
0.15225791931152 0.039035081863403
Output for 5.4.25
0.15812492370605 0.039827108383179
Output for 5.4.24
0.15310716629028 0.039591073989868
Output for 5.4.23
0.14919304847717 0.044513940811157
Output for 5.4.22
0.18818187713623 0.041826009750366
Output for 5.4.21
0.14725208282471 0.038740873336792
Output for 5.4.20
0.16164588928223 0.039776086807251
Output for 5.4.19
0.16318893432617 0.047863960266113
Output for 5.4.18
0.153813123703 0.045861005783081
Output for 5.4.17
0.1350269317627 0.042021989822388
Output for 5.4.16
0.13177013397217 0.041075944900513
Output for 5.4.15
0.14886713027954 0.045147180557251
Output for 5.4.14
0.18027281761169 0.045567989349365
Output for 5.4.13
0.14795303344727 0.039534091949463
Output for 5.4.12
0.16651511192322 0.042914867401123
Output for 5.4.11
0.17667102813721 0.04360294342041
Output for 5.4.10
0.13404893875122 0.039906024932861
Output for 5.4.9
0.1486611366272 0.040640115737915
Output for 5.4.8
0.14629602432251 0.039336204528809
Output for 5.4.7
0.15170621871948 0.041363000869751
Output for 5.4.6
0.15555810928345 0.054325819015503
Output for 5.4.5
0.16292095184326 0.040796041488647
Output for 5.4.4
0.14492106437683 0.040089130401611
Output for 5.4.3
0.14712285995483 0.039533853530884
Output for 5.4.2
0.15758204460144 0.047183990478516
Output for 5.4.1
0.17149901390076 0.040640115737915
Output for 5.4.0
0.15804100036621 0.038609981536865
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/MUfKQ on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/MUfKQ on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/MUfKQ on line 8
Process exited with code 255.

preferences:
62.34 ms | 691 KiB | 5 Q