3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aShitLoadOfSpaces = ' '; $headerName = 'CONTENT-LENGTH'; $start = microtime(true); for ($i = 0; $i < 500000; $i++) { if (strtolower($headerName) === 'content-length') {} } $duration = microtime(true) - $start; echo "strtolower: $duration\n"; $start = microtime(true); for ($i = 0; $i < 500000; $i++) { if ((($aShitLoadOfSpaces & $headerName) | $headerName) === 'content-length') {} } $duration = microtime(true) - $start; echo "Bitwise 1: $duration\n"; $start = microtime(true); for ($i = 0; $i < 500000; $i++) { if (trim($aShitLoadOfSpaces | $headerName) === 'content-length') {} } $duration = microtime(true) - $start; echo "Bitwise 2: $duration\n";
Output for 7.2.0
strtolower: 0.025743961334229 Bitwise 1: 0.035329103469849 Bitwise 2: 0.072041034698486
Output for 7.1.7
strtolower: 0.033034801483154 Bitwise 1: 0.03794002532959 Bitwise 2: 0.076695919036865
Output for 7.1.6
strtolower: 0.056400060653687 Bitwise 1: 0.055629968643188 Bitwise 2: 0.095120906829834
Output for 7.1.5
strtolower: 0.056236028671265 Bitwise 1: 0.054298162460327 Bitwise 2: 0.099045038223267
Output for 7.1.0
strtolower: 0.02320408821106 Bitwise 1: 0.032025814056396 Bitwise 2: 0.071645975112915
Output for 7.0.20
strtolower: 0.032235860824585 Bitwise 1: 0.035037994384766 Bitwise 2: 0.079421997070312
Output for 7.0.14
strtolower: 0.043039798736572 Bitwise 1: 0.046037197113037 Bitwise 2: 0.086222171783447
Output for 7.0.12
strtolower: 0.042624950408936 Bitwise 1: 0.047523021697998 Bitwise 2: 0.089168787002563
Output for 7.0.6
strtolower: 0.035243034362793 Bitwise 1: 0.047284126281738 Bitwise 2: 0.10613584518433
Output for 7.0.5
strtolower: 0.036393880844116 Bitwise 1: 0.039096117019653 Bitwise 2: 0.10403203964233
Output for 7.0.4
strtolower: 0.036080837249756 Bitwise 1: 0.045098066329956 Bitwise 2: 0.083611011505127
Output for 7.0.3
strtolower: 0.033312082290649 Bitwise 1: 0.042073965072632 Bitwise 2: 0.10454893112183
Output for 7.0.2
strtolower: 0.028028964996338 Bitwise 1: 0.037523984909058 Bitwise 2: 0.10554122924805
Output for 7.0.1
strtolower: 0.029255867004395 Bitwise 1: 0.039210081100464 Bitwise 2: 0.10362100601196
Output for 7.0.0
strtolower: 0.025460004806519 Bitwise 1: 0.037680149078369 Bitwise 2: 0.10544085502625
Output for 5.6.28
strtolower: -0.056380033493042 Bitwise 1: -0.072690963745117 Bitwise 2: -0.13177895545959
Output for 5.6.21
strtolower: 0.062314033508301 Bitwise 1: 0.04803204536438 Bitwise 2: 0.16472697257996
Output for 5.6.20
strtolower: 0.08501410484314 Bitwise 1: 0.061856985092163 Bitwise 2: 0.19904780387878
Output for 5.6.19
strtolower: 0.064614057540894 Bitwise 1: 0.044501781463623 Bitwise 2: 0.12326502799988
Output for 5.6.18
strtolower: 0.083709001541138 Bitwise 1: 0.057267904281616 Bitwise 2: 0.15125799179077
Output for 5.6.17
strtolower: 0.087365865707397 Bitwise 1: 0.05954384803772 Bitwise 2: 0.18971395492554
Output for 5.6.16
strtolower: 0.072324991226196 Bitwise 1: 0.045520067214966 Bitwise 2: 0.14680004119873
Output for 5.6.15
strtolower: 0.063742160797119 Bitwise 1: 0.045145988464355 Bitwise 2: 0.1483678817749
Output for 5.6.14
strtolower: 0.076252937316895 Bitwise 1: 0.048500061035156 Bitwise 2: 0.14909696578979
Output for 5.6.13
strtolower: 0.077847003936768 Bitwise 1: 0.049226045608521 Bitwise 2: 0.14796686172485
Output for 5.6.12
strtolower: 0.071129083633423 Bitwise 1: 0.047360181808472 Bitwise 2: 0.14605283737183
Output for 5.6.11
strtolower: 0.1090190410614 Bitwise 1: 0.079241991043091 Bitwise 2: 0.23345613479614
Output for 5.6.10
strtolower: 0.077450037002563 Bitwise 1: 0.048447132110596 Bitwise 2: 0.14681887626648
Output for 5.6.9
strtolower: 0.083937168121338 Bitwise 1: 0.051810026168823 Bitwise 2: 0.1660099029541
Output for 5.6.8
strtolower: 0.055039167404175 Bitwise 1: 0.043322801589966 Bitwise 2: 0.14312505722046
Output for 5.6.7
strtolower: 0.057404041290283 Bitwise 1: 0.044574022293091 Bitwise 2: 0.14707279205322
Output for 5.5.35
strtolower: 0.079906940460205 Bitwise 1: 0.047718048095703 Bitwise 2: 0.14878106117249
Output for 5.5.34
strtolower: 0.072378873825073 Bitwise 1: 0.045727968215942 Bitwise 2: 0.15171885490417
Output for 5.5.33
strtolower: 0.078537940979004 Bitwise 1: 0.047044038772583 Bitwise 2: 0.12278580665588
Output for 5.5.32
strtolower: 0.062615156173706 Bitwise 1: 0.044641017913818 Bitwise 2: 0.12514114379883
Output for 5.5.31
strtolower: 0.058835983276367 Bitwise 1: 0.045652866363525 Bitwise 2: 0.14515590667725
Output for 5.5.30
strtolower: 0.069563150405884 Bitwise 1: 0.045970916748047 Bitwise 2: 0.15026187896729
Output for 5.5.29
strtolower: 0.060199975967407 Bitwise 1: 0.045338153839111 Bitwise 2: 0.14765501022339
Output for 5.5.28
strtolower: 0.076916933059692 Bitwise 1: 0.048369884490967 Bitwise 2: 0.15051507949829
Output for 5.5.27
strtolower: 0.055467844009399 Bitwise 1: 0.043466806411743 Bitwise 2: 0.14585590362549
Output for 5.5.26
strtolower: 0.10442614555359 Bitwise 1: 0.054904937744141 Bitwise 2: 0.15114307403564
Output for 5.5.25
strtolower: 0.077964067459106 Bitwise 1: 0.047867059707642 Bitwise 2: 0.14936900138855
Output for 5.5.24
strtolower: 0.066804885864258 Bitwise 1: 0.045099020004272 Bitwise 2: 0.14922094345093
Output for 5.4.45
strtolower: 0.065611839294434 Bitwise 1: 0.046419143676758 Bitwise 2: 0.12475299835205
Output for 5.4.44
strtolower: 0.074190855026245 Bitwise 1: 0.048293828964233 Bitwise 2: 0.12442898750305
Output for 5.4.43
strtolower: 0.066804885864258 Bitwise 1: 0.049478054046631 Bitwise 2: 0.13213920593262
Output for 5.4.42
strtolower: 0.063230991363525 Bitwise 1: 0.055650949478149 Bitwise 2: 0.12578988075256
Output for 5.4.41
strtolower: 0.060222864151001 Bitwise 1: 0.045943021774292 Bitwise 2: 0.12132501602173
Output for 5.4.40
strtolower: 0.059109926223755 Bitwise 1: 0.044203996658325 Bitwise 2: 0.11908793449402
Output for 5.4.39
strtolower: 0.054830074310303 Bitwise 1: 0.043859958648682 Bitwise 2: 0.12034201622009
Output for 5.4.38
strtolower: 0.057381153106689 Bitwise 1: 0.044256925582886 Bitwise 2: 0.12103199958801
Output for 5.4.37
strtolower: 0.055761814117432 Bitwise 1: 0.044121980667114 Bitwise 2: 0.12243700027466
Output for 5.4.36
strtolower: 0.058096170425415 Bitwise 1: 0.044976949691772 Bitwise 2: 0.12489414215088
Output for 5.4.35
strtolower: 0.10513401031494 Bitwise 1: 0.046389102935791 Bitwise 2: 0.12457609176636
Output for 5.4.34
strtolower: 0.078742980957031 Bitwise 1: 0.050580024719238 Bitwise 2: 0.12326693534851
Output for 5.4.32
strtolower: 0.087496042251587 Bitwise 1: 0.060084819793701 Bitwise 2: 0.16215801239014
Output for 5.4.31
strtolower: 0.07947301864624 Bitwise 1: 0.049822807312012 Bitwise 2: 0.12148690223694
Output for 5.4.30
strtolower: 0.073255062103271 Bitwise 1: 0.047551870346069 Bitwise 2: 0.12379002571106
Output for 5.4.29
strtolower: 0.071223020553589 Bitwise 1: 0.047423839569092 Bitwise 2: 0.12580513954163
Output for 5.4.28
strtolower: 0.098971128463745 Bitwise 1: 0.05468487739563 Bitwise 2: 0.13012099266052
Output for 5.4.27
strtolower: 0.086288213729858 Bitwise 1: 0.052818059921265 Bitwise 2: 0.12377381324768
Output for 5.4.26
strtolower: 0.08084511756897 Bitwise 1: 0.05334997177124 Bitwise 2: 0.12482810020447
Output for 5.4.25
strtolower: 0.067173957824707 Bitwise 1: 0.046752214431763 Bitwise 2: 0.12435007095337
Output for 5.4.24
strtolower: 0.07949686050415 Bitwise 1: 0.049288034439087 Bitwise 2: 0.12512707710266
Output for 5.4.23
strtolower: 0.071812868118286 Bitwise 1: 0.047226905822754 Bitwise 2: 0.12205791473389
Output for 5.4.22
strtolower: 0.077760934829712 Bitwise 1: 0.047984838485718 Bitwise 2: 0.13008689880371
Output for 5.4.21
strtolower: 0.081377983093262 Bitwise 1: 0.049391031265259 Bitwise 2: 0.12142395973206
Output for 5.4.20
strtolower: 0.068069219589233 Bitwise 1: 0.04582405090332 Bitwise 2: 0.12223291397095
Output for 5.4.19
strtolower: 0.074335098266602 Bitwise 1: 0.05767297744751 Bitwise 2: 0.15139293670654
Output for 5.4.18
strtolower: 0.064495086669922 Bitwise 1: 0.046910047531128 Bitwise 2: 0.12433695793152
Output for 5.4.17
strtolower: 0.068828105926514 Bitwise 1: 0.045843124389648 Bitwise 2: 0.12411379814148
Output for 5.4.16
strtolower: 0.060786962509155 Bitwise 1: 0.045118093490601 Bitwise 2: 0.1242778301239
Output for 5.4.15
strtolower: 0.078384876251221 Bitwise 1: 0.048699140548706 Bitwise 2: 0.12256908416748
Output for 5.4.14
strtolower: 0.075725078582764 Bitwise 1: 0.046747207641602 Bitwise 2: 0.12554001808167
Output for 5.4.13
strtolower: 0.082568883895874 Bitwise 1: 0.052599906921387 Bitwise 2: 0.12300610542297
Output for 5.4.12
strtolower: 0.082902193069458 Bitwise 1: 0.052165985107422 Bitwise 2: 0.12468290328979
Output for 5.4.11
strtolower: 0.070528984069824 Bitwise 1: 0.046555042266846 Bitwise 2: 0.12744092941284
Output for 5.4.10
strtolower: 0.070681810379028 Bitwise 1: 0.045587062835693 Bitwise 2: 0.12499117851257
Output for 5.4.9
strtolower: 0.071242094039917 Bitwise 1: 0.053375005722046 Bitwise 2: 0.14782404899597
Output for 5.4.8
strtolower: 0.082828998565674 Bitwise 1: 0.049177169799805 Bitwise 2: 0.13355684280396
Output for 5.4.7
strtolower: 0.080863952636719 Bitwise 1: 0.04896092414856 Bitwise 2: 0.12106800079346
Output for 5.4.6
strtolower: 0.062846899032593 Bitwise 1: 0.043653011322021 Bitwise 2: 0.12234497070312
Output for 5.4.5
strtolower: 0.085566997528076 Bitwise 1: 0.050352096557617 Bitwise 2: 0.12129998207092
Output for 5.4.4
strtolower: 0.060817956924438 Bitwise 1: 0.044076919555664 Bitwise 2: 0.12287402153015
Output for 5.4.3
strtolower: 0.088852882385254 Bitwise 1: 0.066400051116943 Bitwise 2: 0.16444396972656
Output for 5.4.2
strtolower: 0.090171098709106 Bitwise 1: 0.044868946075439 Bitwise 2: 0.12164187431335
Output for 5.4.1
strtolower: 0.073675155639648 Bitwise 1: 0.045477151870728 Bitwise 2: 0.11988806724548
Output for 5.4.0
strtolower: 0.069747924804688 Bitwise 1: 0.045224189758301 Bitwise 2: 0.12611317634583
Output for 5.3.29
strtolower: 0.092426061630249 Bitwise 1: 0.051666975021362 Bitwise 2: 0.13953900337219
Output for 5.3.28
strtolower: 0.091529130935669 Bitwise 1: 0.052228927612305 Bitwise 2: 0.13668990135193
Output for 5.3.27
strtolower: 0.08500599861145 Bitwise 1: 0.051748037338257 Bitwise 2: 0.13102102279663
Output for 5.3.26
strtolower: 0.095479011535645 Bitwise 1: 0.053154945373535 Bitwise 2: 0.13272500038147
Output for 5.3.25
strtolower: 0.067422151565552 Bitwise 1: 0.050318002700806 Bitwise 2: 0.13276886940002
Output for 5.3.24
strtolower: 0.07961106300354 Bitwise 1: 0.051275968551636 Bitwise 2: 0.13312911987305
Output for 5.3.23
strtolower: 0.069047927856445 Bitwise 1: 0.054658174514771 Bitwise 2: 0.13501214981079
Output for 5.3.22
strtolower: 0.093000888824463 Bitwise 1: 0.052489995956421 Bitwise 2: 0.13673806190491
Output for 5.3.21
strtolower: 0.084283113479614 Bitwise 1: 0.052756071090698 Bitwise 2: 0.13572406768799
Output for 5.3.20
strtolower: 0.082035064697266 Bitwise 1: 0.052150011062622 Bitwise 2: 0.13631582260132
Output for 5.3.19
strtolower: 0.076640129089355 Bitwise 1: 0.052942991256714 Bitwise 2: 0.13850808143616
Output for 5.3.18
strtolower: 0.081725835800171 Bitwise 1: 0.052844047546387 Bitwise 2: 0.13221788406372
Output for 5.3.17
strtolower: 0.084888935089111 Bitwise 1: 0.052479982376099 Bitwise 2: 0.1342499256134
Output for 5.3.16
strtolower: 0.082765102386475 Bitwise 1: 0.05420994758606 Bitwise 2: 0.13823699951172
Output for 5.3.15
strtolower: 0.078726053237915 Bitwise 1: 0.053390026092529 Bitwise 2: 0.13734292984009
Output for 5.3.14
strtolower: 0.083395004272461 Bitwise 1: 0.052082061767578 Bitwise 2: 0.13838505744934
Output for 5.3.13
strtolower: 0.067982912063599 Bitwise 1: 0.051803112030029 Bitwise 2: 0.13656616210938
Output for 5.3.12
strtolower: 0.091269969940186 Bitwise 1: 0.063604831695557 Bitwise 2: 0.16361093521118
Output for 5.3.11
strtolower: 0.067755937576294 Bitwise 1: 0.051619052886963 Bitwise 2: 0.13643002510071
Output for 5.3.10
strtolower: 0.088382959365845 Bitwise 1: 0.053879976272583 Bitwise 2: 0.13415479660034
Output for 5.3.9
strtolower: 0.082715034484863 Bitwise 1: 0.056030988693237 Bitwise 2: 0.12926912307739
Output for 5.3.8
strtolower: 0.085186004638672 Bitwise 1: 0.055344104766846 Bitwise 2: 0.12678289413452
Output for 5.3.7
strtolower: 0.094353914260864 Bitwise 1: 0.057164907455444 Bitwise 2: 0.12638998031616
Output for 5.3.6
strtolower: 0.082162857055664 Bitwise 1: 0.053699016571045 Bitwise 2: 0.12883496284485
Output for 5.3.5
strtolower: 0.073817014694214 Bitwise 1: 0.058155059814453 Bitwise 2: 0.13582420349121
Output for 5.3.4
strtolower: 0.064006090164185 Bitwise 1: 0.051639080047607 Bitwise 2: 0.12586808204651
Output for 5.3.3
strtolower: 0.091623067855835 Bitwise 1: 0.055500030517578 Bitwise 2: 0.12602806091309
Output for 5.3.2
strtolower: 0.090214967727661 Bitwise 1: 0.055577993392944 Bitwise 2: 0.12847995758057
Output for 5.3.1
strtolower: 0.081898927688599 Bitwise 1: 0.054839849472046 Bitwise 2: 0.1291720867157
Output for 5.3.0
strtolower: 0.090289115905762 Bitwise 1: 0.057492971420288 Bitwise 2: 0.12983298301697
Output for 5.2.17
strtolower: 0.071417093276978 Bitwise 1: 0.058326005935669 Bitwise 2: 0.12863087654114
Output for 5.2.16
strtolower: 0.073055982589722 Bitwise 1: 0.056366920471191 Bitwise 2: 0.12652707099915
Output for 5.2.15
strtolower: 0.10249710083008 Bitwise 1: 0.059101104736328 Bitwise 2: 0.13023900985718
Output for 5.2.14
strtolower: 0.073029041290283 Bitwise 1: 0.058671951293945 Bitwise 2: 0.13055992126465
Output for 5.2.13
strtolower: 0.075407981872559 Bitwise 1: 0.060853004455566 Bitwise 2: 0.14681100845337
Output for 5.2.12
strtolower: 0.080583095550537 Bitwise 1: 0.06400990486145 Bitwise 2: 0.14563894271851
Output for 5.2.11
strtolower: 0.074115991592407 Bitwise 1: 0.058732986450195 Bitwise 2: 0.12962985038757
Output for 5.2.10
strtolower: 0.092483997344971 Bitwise 1: 0.059927940368652 Bitwise 2: 0.13047003746033
Output for 5.2.9
strtolower: 0.094185829162598 Bitwise 1: 0.059104919433594 Bitwise 2: 0.12764191627502
Output for 5.2.8
strtolower: 0.10206007957458 Bitwise 1: 0.058250904083252 Bitwise 2: 0.12988615036011
Output for 5.2.7
strtolower: 0.10280895233154 Bitwise 1: 0.061736822128296 Bitwise 2: 0.12914299964905
Output for 5.2.6
strtolower: 0.08258581161499 Bitwise 1: 0.057338953018188 Bitwise 2: 0.12766599655151
Output for 5.2.5
strtolower: 0.072082996368408 Bitwise 1: 0.058180809020996 Bitwise 2: 0.13082098960876
Output for 5.2.4
strtolower: 0.08085298538208 Bitwise 1: 0.070353031158447 Bitwise 2: 0.14460182189941
Output for 5.2.3
strtolower: 0.096234083175659 Bitwise 1: 0.061043977737427 Bitwise 2: 0.13065099716187
Output for 5.2.2
strtolower: 0.088208913803101 Bitwise 1: 0.059808969497681 Bitwise 2: 0.15177488327026
Output for 5.2.1
strtolower: 0.10066294670105 Bitwise 1: 0.072107076644897 Bitwise 2: 0.17567706108093
Output for 5.2.0
strtolower: 0.096601009368896 Bitwise 1: 0.057693004608154 Bitwise 2: 0.13852190971375
Output for 5.1.6
strtolower: 0.075569152832031 Bitwise 1: 0.063173055648804 Bitwise 2: 0.16606616973877
Output for 5.1.5
strtolower: 0.097182989120483 Bitwise 1: 0.060956001281738 Bitwise 2: 0.15515398979187
Output for 5.1.4
strtolower: 0.091799020767212 Bitwise 1: 0.061010122299194 Bitwise 2: 0.16046500205994
Output for 5.1.3
strtolower: 0.096848011016846 Bitwise 1: 0.073624849319458 Bitwise 2: 0.17381000518799
Output for 5.1.2
strtolower: 0.093714952468872 Bitwise 1: 0.061483860015869 Bitwise 2: 0.15705800056458
Output for 5.1.1
strtolower: 0.081998825073242 Bitwise 1: 0.066832065582275 Bitwise 2: 0.17790699005127
Output for 5.1.0
strtolower: 0.071414947509766 Bitwise 1: 0.060065031051636 Bitwise 2: 0.15179109573364
Output for 5.0.5
strtolower: 0.12198209762573 Bitwise 1: 0.13010287284851 Bitwise 2: 0.22631406784058
Output for 5.0.4
strtolower: 0.14153504371643 Bitwise 1: 0.14526104927063 Bitwise 2: 0.26786303520203
Output for 5.0.3
strtolower: 0.11688709259033 Bitwise 1: 0.1201000213623 Bitwise 2: 0.23153877258301
Output for 5.0.2
strtolower: 0.12312388420105 Bitwise 1: 0.12052297592163 Bitwise 2: 0.2294819355011
Output for 5.0.1
strtolower: 0.16676211357117 Bitwise 1: 0.1181058883667 Bitwise 2: 0.22871398925781
Output for 5.0.0
strtolower: 0.16059303283691 Bitwise 1: 0.15660500526428 Bitwise 2: 0.30449295043945
Output for 4.4.9
strtolower: 0.117791 Bitwise 1: -0.862224 Bitwise 2: 0.226277
Output for 4.4.8
strtolower: 0.148534 Bitwise 1: -0.865351 Bitwise 2: 0.221851
Output for 4.4.7
strtolower: 0.151825 Bitwise 1: 0.134257 Bitwise 2: 0.221119
Output for 4.4.6
strtolower: -0.839019 Bitwise 1: 0.137574 Bitwise 2: 0.222008
Output for 4.4.5
strtolower: 0.163301 Bitwise 1: 0.137226 Bitwise 2: -0.77649
Output for 4.4.4
strtolower: 0.151239 Bitwise 1: 0.135812 Bitwise 2: -0.778415
Output for 4.4.3
strtolower: 0.142683 Bitwise 1: 0.137242 Bitwise 2: -0.779577
Output for 4.4.2
strtolower: 0.122354 Bitwise 1: 0.138621 Bitwise 2: -0.761627
Output for 4.4.1
strtolower: 0.115987 Bitwise 1: 0.133821 Bitwise 2: 0.220871
Output for 4.4.0
strtolower: 0.117055 Bitwise 1: 0.132946 Bitwise 2: 0.235639
Output for 4.3.11
strtolower: 0.11454 Bitwise 1: 0.132997 Bitwise 2: -0.786885
Output for 4.3.10
strtolower: 0.112507 Bitwise 1: -0.867249 Bitwise 2: 0.211757
Output for 4.3.9
strtolower: -0.879271 Bitwise 1: 0.142912 Bitwise 2: 0.21427
Output for 4.3.8
strtolower: -0.840607 Bitwise 1: 0.169643 Bitwise 2: 0.260206
Output for 4.3.7
strtolower: 0.151009 Bitwise 1: 0.163923 Bitwise 2: -0.772023
Output for 4.3.6
strtolower: 0.162353 Bitwise 1: 0.139008 Bitwise 2: 0.223805
Output for 4.3.5
strtolower: -0.841417 Bitwise 1: 0.135707 Bitwise 2: 0.220359
Output for 4.3.4
strtolower: 0.173912 Bitwise 1: 0.183104 Bitwise 2: -0.685955
Output for 4.3.3
strtolower: 0.15358 Bitwise 1: 0.137411 Bitwise 2: 0.228451
Output for 4.3.2
strtolower: 0.114975 Bitwise 1: 0.134071 Bitwise 2: 0.214194
Output for 4.3.1
strtolower: 0.128881 Bitwise 1: 0.131934 Bitwise 2: -0.783966
Output for 4.3.0
strtolower: 0.184545 Bitwise 1: 0.161049 Bitwise 2: 0.248837

preferences:
146.01 ms | 401 KiB | 176 Q