3v4l.org

run code in 300+ PHP versions simultaneously
<?php function removeCommonWords($input){ // EEEEEEK Stop words $commonWords = array('a','able','about','above','abroad','according','accordingly','across','actually','adj','after','afterwards','again','against','ago','ahead','ain\'t','all','allow','allows','almost','alone','along','alongside','already','also','although','always','am','amid','amidst','among','amongst','an','and','another','any','anybody','anyhow','anyone','anything','anyway','anyways','anywhere','apart','appear','appreciate','appropriate','are','aren\'t','around','as','a\'s','aside','ask','asking','associated','at','available','away','awfully','b','back','backward','backwards','be','became','because','become','becomes','becoming','been','before','beforehand','begin','behind','being','believe','below','beside','besides','best','better','between','beyond','both','brief','but','by','c','came','can','cannot','cant','can\'t','caption','cause','causes','certain','certainly','changes','clearly','c\'mon','co','co.','com','come','comes','concerning','consequently','consider','considering','contain','containing','contains','corresponding','could','couldn\'t','course','c\'s','currently','d','dare','daren\'t','definitely','described','despite','did','didn\'t','different','directly','do','does','doesn\'t','doing','done','don\'t','down','downwards','during','e','each','edu','eg','eight','eighty','either','else','elsewhere','end','ending','enough','entirely','especially','et','etc','even','ever','evermore','every','everybody','everyone','everything','everywhere','ex','exactly','example','except','f','fairly','far','farther','few','fewer','fifth','first','five','followed','following','follows','for','forever','former','formerly','forth','forward','found','four','from','further','furthermore','g','get','gets','getting','given','gives','go','goes','going','gone','got','gotten','greetings','h','had','hadn\'t','half','happens','hardly','has','hasn\'t','have','haven\'t','having','he','he\'d','he\'ll','hello','help','hence','her','here','hereafter','hereby','herein','here\'s','hereupon','hers','herself','he\'s','hi','him','himself','his','hither','hopefully','how','howbeit','however','hundred','i','i\'d','ie','if','ignored','i\'ll','i\'m','immediate','in','inasmuch','inc','inc.','indeed','indicate','indicated','indicates','inner','inside','insofar','instead','into','inward','is','isn\'t','it','it\'d','it\'ll','its','it\'s','itself','i\'ve','j','just','k','keep','keeps','kept','know','known','knows','l','last','lately','later','latter','latterly','least','less','lest','let','let\'s','like','liked','likely','likewise','little','look','looking','looks','low','lower','ltd','m','made','mainly','make','makes','many','may','maybe','mayn\'t','me','mean','meantime','meanwhile','merely','might','mightn\'t','mine','minus','miss','more','moreover','most','mostly','mr','mrs','much','must','mustn\'t','my','myself','n','name','namely','nd','near','nearly','necessary','need','needn\'t','needs','neither','never','neverf','neverless','nevertheless','new','next','nine','ninety','no','nobody','non','none','nonetheless','noone','no-one','nor','normally','not','nothing','notwithstanding','novel','now','nowhere','o','obviously','of','off','often','oh','ok','okay','old','on','once','one','ones','one\'s','only','onto','opposite','or','other','others','otherwise','ought','oughtn\'t','our','ours','ourselves','out','outside','over','overall','own','p','particular','particularly','past','per','perhaps','placed','please','plus','possible','presumably','probably','provided','provides','q','que','quite','qv','r','rather','rd','re','really','reasonably','recent','recently','regarding','regardless','regards','relatively','respectively','right','round','s','said','same','saw','say','saying','says','second','secondly','see','seeing','seem','seemed','seeming','seems','seen','self','selves','sensible','sent','serious','seriously','seven','several','shall','shan\'t','she','she\'d','she\'ll','she\'s','should','shouldn\'t','since','six','so','some','somebody','someday','somehow','someone','something','sometime','sometimes','somewhat','somewhere','soon','sorry','specified','specify','specifying','still','sub','such','sup','sure','t','take','taken','taking','tell','tends','th','than','thank','thanks','thanx','that','that\'ll','thats','that\'s','that\'ve','the','their','theirs','them','themselves','then','thence','there','thereafter','thereby','there\'d','therefore','therein','there\'ll','there\'re','theres','there\'s','thereupon','there\'ve','these','they','they\'d','they\'ll','they\'re','they\'ve','thing','things','think','third','thirty','this','thorough','thoroughly','those','though','three','through','throughout','thru','thus','till','to','together','too','took','toward','towards','tried','tries','truly','try','trying','t\'s','twice','two','u','un','under','underneath','undoing','unfortunately','unless','unlike','unlikely','until','unto','up','upon','upwards','us','use','used','useful','uses','using','usually','v','value','various','versus','very','via','viz','vs','w','want','wants','was','wasn\'t','way','we','we\'d','welcome','well','we\'ll','went','were','we\'re','weren\'t','we\'ve','what','whatever','what\'ll','what\'s','what\'ve','when','whence','whenever','where','whereafter','whereas','whereby','wherein','where\'s','whereupon','wherever','whether','which','whichever','while','whilst','whither','who','who\'d','whoever','whole','who\'ll','whom','whomever','who\'s','whose','why','will','willing','wish','with','within','without','wonder','won\'t','would','wouldn\'t','x','y','yes','yet','you','you\'d','you\'ll','your','you\'re','yours','yourself','yourselves','you\'ve','z','zero'); return preg_replace('/\b('.implode('|',$commonWords).')\b/','',$input); } print(preg_replace('/[\s+]+/', ' ', removeCommonWords("This is my Title! It is about Cats, Dogs, and Furry Animals."))); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.140.0220.01118.22
8.4.130.0140.00818.29
8.4.120.0100.01120.59
8.4.110.0050.00619.14
8.4.100.0120.01118.28
8.4.90.0120.01118.38
8.4.80.0130.00918.53
8.4.70.0090.01018.56
8.4.60.0080.00319.45
8.4.50.0080.01018.37
8.4.40.0070.00918.02
8.4.30.0090.01320.64
8.4.20.0090.01318.62
8.4.10.0110.01118.21
8.3.270.0150.00717.37
8.3.260.0100.01017.11
8.3.250.0110.00919.20
8.3.240.0100.01119.32
8.3.230.0150.00517.07
8.3.220.0110.01017.18
8.3.210.0040.01017.48
8.3.200.0060.00417.09
8.3.190.0100.01117.79
8.3.180.0140.00817.11
8.3.170.0070.01317.26
8.3.160.0170.00317.24
8.3.150.0060.00317.73
8.3.140.0060.00321.27
8.3.130.0060.00319.02
8.3.120.0030.00921.20
8.3.110.0070.00316.92
8.3.100.0080.00317.34
8.3.90.0100.01026.77
8.3.80.0070.00317.36
8.3.70.0060.01017.00
8.3.60.0160.00017.13
8.3.50.0030.01320.38
8.3.40.0080.00820.84
8.3.30.0150.00319.13
8.3.20.0000.00824.18
8.3.10.0040.00424.66
8.3.00.0030.00626.16
8.2.290.0080.00520.68
8.2.280.0120.00919.07
8.2.270.0130.00717.11
8.2.260.0160.00319.36
8.2.250.0030.00617.23
8.2.240.0100.00017.55
8.2.230.0090.00020.94
8.2.220.0030.00624.06
8.2.210.0030.00626.77
8.2.200.0030.00617.13
8.2.190.0100.00719.16
8.2.180.0110.00425.92
8.2.170.0130.00319.58
8.2.160.0130.00622.96
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0000.00926.16
8.2.110.0070.00320.95
8.2.100.0040.00818.41
8.2.90.0060.00318.53
8.2.80.0040.00818.54
8.2.70.0000.01118.13
8.2.60.0040.00418.43
8.2.50.0090.00018.25
8.2.40.0050.00618.55
8.2.30.0050.00618.24
8.2.20.0020.00719.62
8.2.10.0040.00518.18
8.2.00.0070.00618.82
8.1.330.0110.01020.60
8.1.320.0080.01317.06
8.1.310.0140.00716.84
8.1.300.0100.01020.73
8.1.290.0080.00330.84
8.1.280.0080.00825.92
8.1.270.0060.00324.22
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00322.92
8.1.230.0130.00021.54
8.1.220.0060.00318.29
8.1.210.0060.00319.23
8.1.200.0030.00618.10
8.1.190.0040.00717.75
8.1.180.0030.00618.10
8.1.170.0070.00518.55
8.1.160.0050.00518.54
8.1.150.0040.00618.60
8.1.140.0050.00617.92
8.1.130.0050.00418.61
8.1.120.0050.00617.88
8.1.110.0060.00517.90
8.1.100.0050.00518.01
8.1.90.0030.00818.06
8.1.80.0040.00817.88
8.1.70.0080.00218.07
8.1.60.0050.00618.08
8.1.50.0050.00518.05
8.1.40.0020.00817.99
8.1.30.0040.00618.05
8.1.20.0070.00518.15
8.1.10.0050.00718.02
8.1.00.0020.00917.84
8.0.300.0080.00020.41
8.0.290.0060.00317.12
8.0.280.0080.00319.10
8.0.270.0030.00618.92
8.0.260.0040.00518.29
8.0.250.0040.00817.56
8.0.240.0030.00717.62
8.0.230.0020.00817.55
8.0.220.0020.00817.59
8.0.210.0000.01117.56
8.0.200.0050.00517.61
8.0.190.0030.00817.60
8.0.180.0060.00417.53
8.0.170.0060.00517.61
8.0.160.0050.00517.54
8.0.150.0030.00817.55
8.0.140.0060.00617.46
8.0.130.0060.00617.55
8.0.120.0020.01017.52
8.0.110.0060.00517.53
8.0.100.0050.00617.53
8.0.90.0090.00217.47
8.0.80.0060.00517.53
8.0.70.0070.00517.53
8.0.60.0030.00917.48
8.0.50.0100.00217.43
8.0.30.0070.00617.47
8.0.20.0040.00817.46
8.0.10.0070.00517.53
7.4.330.0060.00516.63
7.4.320.0120.00117.35
7.4.300.0020.00917.37
7.4.290.0050.00617.35
7.4.280.0080.00317.43
7.4.270.0050.00717.41
7.4.260.0060.00417.38
7.4.250.0090.00317.32
7.4.240.0040.00617.33
7.4.230.0060.00517.37
7.4.220.0060.00517.42
7.4.210.0080.00517.38
7.4.200.0050.00617.41
7.4.190.0030.00817.34
7.4.180.0040.00817.45
7.4.160.0060.00417.39
7.4.150.0040.00717.41
7.4.140.0080.00317.39
7.4.130.0040.00817.41
7.4.120.0070.00317.39
7.4.110.0090.00117.38
7.4.100.0080.00317.39
7.4.90.0080.00217.41
7.4.80.0060.00617.41
7.4.70.0040.00517.35
7.4.60.0060.00417.43
7.4.50.0050.00517.37
7.4.40.0050.00517.37
7.4.30.0060.00617.33
7.4.20.0050.00517.32
7.4.10.0020.00917.38
7.4.00.0080.00217.36

preferences:
30.42 ms | 403 KiB | 5 Q