3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $limit = 100000; $t0 = microtime(true); for ($i = 0; $i < $limit; ++$i) { $j = $i % 10 === 0; } echo microtime(true) - $t0 . PHP_EOL; $t0 = microtime(true); for ($i = 0; $i < $limit; ++$i) { $j = $i & 1; } echo microtime(true) - $t0 . PHP_EOL; $t0 = microtime(true); for ($i = 0; $i < $limit; ++$i) { $j = (bool) $i & 10; } echo microtime(true) - $t0 . PHP_EOL;
based on dBOIM
Output for 7.1.0
0.0043017864227295 0.0018107891082764 0.0037059783935547
Output for 7.0.14
0.0040087699890137 0.002190113067627 0.0035810470581055
Output for 7.0.6
0.0049529075622559 0.0020880699157715 0.0032680034637451
Output for 7.0.5
0.0040698051452637 0.002112865447998 0.0031991004943848
Output for 7.0.4
0.0029888153076172 0.0015420913696289 0.0023119449615479
Output for 7.0.3
0.0027580261230469 0.0015599727630615 0.00223708152771
Output for 7.0.2
0.00376296043396 0.0020828247070312 0.0025181770324707
Output for 7.0.1
0.0052709579467773 0.0023379325866699 0.003493070602417
Output for 7.0.0
0.0038418769836426 0.0019018650054932 0.0028679370880127
Output for hhvm-3.12.0
0.0074169635772705 0.0055091381072998 0.0058908462524414
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
0.0069429874420166 0.0052409172058105 0.0061938762664795
Output for 5.6.21
0.008465051651001 0.005681037902832 0.0074090957641602
Output for 5.6.20
0.0041661262512207 0.0035920143127441 0.003777027130127
Output for 5.6.19
0.010918140411377 0.0071678161621094 0.0089528560638428
Output for 5.6.18
0.0056381225585938 0.003835916519165 0.0050268173217773
Output for 5.6.17
0.0048129558563232 0.0032391548156738 0.0042190551757812
Output for 5.6.16
0.0055418014526367 0.0038321018218994 0.0048038959503174
Output for 5.6.15
0.004439115524292 0.0028390884399414 0.0039730072021484
Output for 5.6.14
0.0041680335998535 0.0029470920562744 0.0038061141967773
Output for 5.6.13
0.006119966506958 0.0040929317474365 0.0053069591522217
Output for 5.6.12
0.0045061111450195 0.0030410289764404 0.0040009021759033
Output for 5.6.11
0.0058701038360596 0.0039188861846924 0.0052030086517334
Output for 5.6.10
0.0062639713287354 0.0043809413909912 0.0055148601531982
Output for 5.6.9
0.006234884262085 0.0037410259246826 0.0052351951599121
Output for 5.6.8
0.0063750743865967 0.0037260055541992 0.0048010349273682
Output for 5.6.7
0.0042400360107422 0.0028400421142578 0.003864049911499
Output for 5.5.35
0.0068900585174561 0.00506591796875 0.0057699680328369
Output for 5.5.34
0.0066468715667725 0.0046248435974121 0.0054230690002441
Output for 5.5.33
0.0053548812866211 0.0039219856262207 0.0045361518859863
Output for 5.5.32
0.0048980712890625 0.0033330917358398 0.0041608810424805
Output for 5.5.31
0.0055751800537109 0.0039200782775879 0.0048770904541016
Output for 5.5.30
0.0051178932189941 0.0033800601959229 0.0043840408325195
Output for 5.5.29
0.006695032119751 0.0045239925384521 0.0055880546569824
Output for 5.5.28
0.0051960945129395 0.0035600662231445 0.0047111511230469
Output for 5.5.27
0.0057430267333984 0.0039200782775879 0.0049481391906738
Output for 5.5.26
0.0055727958679199 0.0040011405944824 0.0049169063568115
Output for 5.5.25
0.005033016204834 0.0034260749816895 0.0045750141143799
Output for 5.5.24
0.0059881210327148 0.0041370391845703 0.0051748752593994
Output for 5.4.45
0.0050890445709229 0.0038928985595703 0.0048978328704834
Output for 5.4.44
0.0056440830230713 0.0037150382995605 0.0048642158508301
Output for 5.4.43
0.005357027053833 0.0037970542907715 0.0050601959228516
Output for 5.4.42
0.0057680606842041 0.0040979385375977 0.0052599906921387
Output for 5.4.41
0.0062630176544189 0.0039429664611816 0.0053198337554932
Output for 5.4.40
0.0058310031890869 0.0040571689605713 0.0054671764373779
Output for 5.4.39
0.0058250427246094 0.004058837890625 0.0052039623260498
Output for 5.4.38
0.0078129768371582 0.0042848587036133 0.0052931308746338
Output for 5.4.37
0.0057811737060547 0.0039818286895752 0.012602090835571
Output for 5.4.36
0.0058348178863525 0.0041511058807373 0.0056250095367432
Output for 5.4.35
0.005936861038208 0.0041420459747314 0.0057060718536377
Output for 5.4.34
0.004518985748291 0.0039780139923096 0.0045301914215088
Output for 5.4.32
0.005728006362915 0.00484299659729 0.006566047668457
Output for 5.4.31
0.0043740272521973 0.0033299922943115 0.0039920806884766
Output for 5.4.30
0.005871057510376 0.0038590431213379 0.0055899620056152
Output for 5.4.29
0.0045349597930908 0.0031678676605225 0.0041429996490479
Output for 5.4.28
0.0044140815734863 0.0030860900878906 0.0041379928588867
Output for 5.4.27
0.0075180530548096 0.0052669048309326 0.0070509910583496
Output for 5.4.26
0.0071239471435547 0.0050430297851562 0.0065071582794189
Output for 5.4.25
0.0045719146728516 0.0031418800354004 0.0041799545288086
Output for 5.4.24
0.0044329166412354 0.0031919479370117 0.0041921138763428
Output for 5.4.23
0.007037878036499 0.005040168762207 0.0065410137176514
Output for 5.4.22
0.007145881652832 0.005403995513916 0.0066149234771729
Output for 5.4.21
0.0066540241241455 0.0045750141143799 0.0041129589080811
Output for 5.4.20
0.0071079730987549 0.0054149627685547 0.006364107131958
Output for 5.4.19
0.0091378688812256 0.0083081722259521 0.0080211162567139
Output for 5.4.18
0.0085859298706055 0.0080649852752686 0.0082590579986572
Output for 5.4.17
0.0062031745910645 0.0044779777526855 0.0045211315155029
Output for 5.4.16
0.0045619010925293 0.0043189525604248 0.0069580078125
Output for 5.4.15
0.006803035736084 0.0048480033874512 0.0060389041900635
Output for 5.4.14
0.0051829814910889 0.0031850337982178 0.0045061111450195
Output for 5.4.13
0.0055079460144043 0.0032479763031006 0.0042209625244141
Output for 5.4.12
0.006181001663208 0.004932165145874 0.0045428276062012
Output for 5.4.11
0.0050508975982666 0.0055608749389648 0.0043120384216309
Output for 5.4.10
0.0050170421600342 0.0037760734558105 0.0044941902160645
Output for 5.4.9
0.0049221515655518 0.0038940906524658 0.003978967666626
Output for 5.4.8
0.0045540332794189 0.0030019283294678 0.004072904586792
Output for 5.4.7
0.0044498443603516 0.0035250186920166 0.0046908855438232
Output for 5.4.6
0.0048339366912842 0.0033268928527832 0.0041599273681641
Output for 5.4.5
0.0046830177307129 0.0032498836517334 0.0039370059967041
Output for 5.4.4
0.0044009685516357 0.0050129890441895 0.0043900012969971
Output for 5.4.3
0.0049598217010498 0.0035700798034668 0.0047612190246582
Output for 5.4.2
0.0062899589538574 0.0070879459381104 0.004918098449707
Output for 5.4.1
0.0053248405456543 0.0039389133453369 0.0045151710510254
Output for 5.4.0
0.0067651271820068 0.0050230026245117 0.0073659420013428
Output for 5.3.29
0.009213924407959 0.0076010227203369 0.011016130447388
Output for 5.3.28
0.0056099891662598 0.0040299892425537 0.0048730373382568
Output for 5.3.27
0.0058929920196533 0.0054318904876709 0.005713939666748
Output for 5.3.26
0.0060408115386963 0.0043208599090576 0.0075900554656982
Output for 5.3.25
0.0057129859924316 0.0054700374603271 0.0068628787994385
Output for 5.3.24
0.0063300132751465 0.0044920444488525 0.0055370330810547
Output for 5.3.23
0.0069119930267334 0.0046730041503906 0.0058400630950928
Output for 5.3.22
0.0059680938720703 0.0056190490722656 0.0051891803741455
Output for 5.3.21
0.005338191986084 0.0042531490325928 0.0072340965270996
Output for 5.3.20
0.0080618858337402 0.0050628185272217 0.0068161487579346
Output for 5.3.19
0.0065209865570068 0.0050239562988281 0.0078799724578857
Output for 5.3.18
0.0059819221496582 0.004256010055542 0.0051288604736328
Output for 5.3.17
0.0073521137237549 0.0062921047210693 0.0084941387176514
Output for 5.3.16
0.0072510242462158 0.0040268898010254 0.0049228668212891
Output for 5.3.15
0.0055050849914551 0.0042479038238525 0.0050058364868164
Output for 5.3.14
0.0062859058380127 0.0042741298675537 0.006026029586792
Output for 5.3.13
0.0058839321136475 0.0039818286895752 0.0049400329589844
Output for 5.3.12
0.0059690475463867 0.0043220520019531 0.0050570964813232
Output for 5.3.11
0.0057790279388428 0.0041022300720215 0.0051620006561279
Output for 5.3.10
0.0056169033050537 0.0043270587921143 0.0050039291381836
Output for 5.3.9
0.0059170722961426 0.0043771266937256 0.0053110122680664
Output for 5.3.8
0.005640983581543 0.0043540000915527 0.0053391456604004
Output for 5.3.7
0.005897045135498 0.0043230056762695 0.0053229331970215
Output for 5.3.6
0.0063290596008301 0.0041790008544922 0.0053880214691162
Output for 5.3.5
0.0059168338775635 0.0043051242828369 0.0050928592681885
Output for 5.3.4
0.005875825881958 0.0043139457702637 0.0052690505981445
Output for 5.3.3
0.0056231021881104 0.0047409534454346 0.0050690174102783
Output for 5.3.2
0.0060610771179199 0.004518985748291 0.0056281089782715
Output for 5.3.1
0.0055580139160156 0.0046360492706299 0.0052378177642822
Output for 5.3.0
0.0087330341339111 0.0062870979309082 0.0079171657562256
Output for 5.2.17
0.0079870223999023 0.0071549415588379 0.011686086654663
Output for 5.2.16
0.0078930854797363 0.0061140060424805 0.0073580741882324
Output for 5.2.15
0.007767915725708 0.0061988830566406 0.0075180530548096
Output for 5.2.14
0.007767915725708 0.0087039470672607 0.007932186126709
Output for 5.2.13
0.0086719989776611 0.0082998275756836 0.0098590850830078
Output for 5.2.12
0.0094258785247803 0.0062170028686523 0.010264873504639
Output for 5.2.11
0.0099010467529297 0.0062921047210693 0.0073578357696533
Output for 5.2.10
0.0073721408843994 0.0062329769134521 0.0074999332427979
Output for 5.2.9
0.007728099822998 0.0059170722961426 0.0070619583129883
Output for 5.2.8
0.0081629753112793 0.0063679218292236 0.007544994354248
Output for 5.2.7
0.0081641674041748 0.0066959857940674 0.00850510597229
Output for 5.2.6
0.0074310302734375 0.0059230327606201 0.0077848434448242
Output for 5.2.5
0.0080809593200684 0.0063080787658691 0.0075860023498535
Output for 5.2.4
0.0084729194641113 0.006817102432251 0.0082941055297852
Output for 5.2.3
0.010294914245605 0.006209135055542 0.0075550079345703
Output for 5.2.2
0.0080611705780029 0.0062799453735352 0.007375955581665
Output for 5.2.1
0.008465051651001 0.0089390277862549 0.012296915054321
Output for 5.2.0
0.0080881118774414 0.0065310001373291 0.0093638896942139
Output for 5.1.6
0.0075170993804932 0.0066230297088623 0.0079090595245361
Output for 5.1.5
0.0082409381866455 0.0078079700469971 0.0086569786071777
Output for 5.1.4
0.0082919597625732 0.0071570873260498 0.0081958770751953
Output for 5.1.3
0.01085901260376 0.0086297988891602 0.01106595993042
Output for 5.1.2
0.011522054672241 0.0092499256134033 0.010864019393921
Output for 5.1.1
0.0090529918670654 0.0092329978942871 0.011666059494019
Output for 5.1.0
0.01471996307373 0.010370969772339 0.011874914169312
Output for 5.0.5
0.04141092300415 0.038183927536011 0.041411876678467
Output for 5.0.4
0.043977022171021 0.039752006530762 0.04430890083313
Output for 5.0.3
0.030972957611084 0.027597904205322 0.026827812194824
Output for 5.0.2
0.026251077651978 0.025246858596802 0.027127027511597
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.030977010726929PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.028002977371216PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.030441999435425PHP_EOL
Output for 5.0.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.027999877929688PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.035300016403198PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.026041984558105PHP_EOL
Output for 4.4.9
0.024788 0.023709 0.028565
Output for 4.4.8
0.027505 0.025841 0.030257
Output for 4.4.7
0.032407 0.023977 0.027196
Output for 4.4.6
0.025339 0.022837 0.024986
Output for 4.4.5
0.02527 0.023017 0.024385
Output for 4.4.4
0.0256 0.022967 0.028151
Output for 4.4.3
0.026549 0.024036 0.026059
Output for 4.4.2
0.025944 0.023649 0.029162
Output for 4.4.1
0.028462 -0.976427 0.026916
Output for 4.4.0
0.026253 0.023984 0.025603
Output for 4.3.11
0.027397 0.024188 0.026278
Output for 4.3.10
0.026724 0.023354 0.025063
Output for 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.030681PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.029395PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.024492PHP_EOL
Output for 4.3.8
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.026603PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.028771PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.031663PHP_EOL
Output for 4.3.7
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.031387PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.024888PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.031798PHP_EOL
Output for 4.3.6
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.045657PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.041483PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.054486PHP_EOL
Output for 4.3.5
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.039719PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.048072PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 -0.948034PHP_EOL
Output for 4.3.4
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.062767PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.052929PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.061063PHP_EOL
Output for 4.3.3
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.082068PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.101193PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.055753PHP_EOL
Output for 4.3.2
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.072697PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.085868PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.059156PHP_EOL
Output for 4.3.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.04804PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.029787PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.032698PHP_EOL
Output for 4.3.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 8 0.016529PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 13 0.019557PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/r4rA4 on line 19 0.039048PHP_EOL