3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseStopWords($text){ $text = preg_replace('/[^a-zA-Z0-9áéíóúñ\', ]/i','',$text); $stopwords = array('a','ante','bajo','cabe','con','contra','de','desde','en','entre','hacia','hasta','para','por','sin','sobre','tras','el','lo','la','los','las','un','unos','una','al','del','que','es','se','y','fue'); foreach($stopwords as $w){ $text = preg_replace('/\b'.$w.'\b/i','',$text); } $text = preg_replace('/\s{2,}/i',' ',$text); return $text; } $texto = "Prueba de parseStop worlds para probar la prueba"; var_dump(parseStopWords($texto));

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.3.60.0070.01116.88
8.3.50.0100.01217.49
8.3.40.0070.01418.96
8.3.30.0070.00718.84
8.3.20.0050.00318.90
8.3.10.0000.00920.65
8.3.00.0000.00817.63
8.2.180.0140.00716.88
8.2.170.0110.00422.96
8.2.160.0030.01422.21
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0070.00019.89
8.2.110.0030.00621.12
8.2.100.0060.00617.84
8.2.90.0070.00319.21
8.2.80.0050.00317.93
8.2.70.0030.00617.63
8.2.60.0030.00517.80
8.2.50.0040.00418.07
8.2.40.0040.00418.27
8.2.30.0040.00418.19
8.2.20.0000.00817.90
8.2.10.0000.00918.04
8.2.00.0040.00417.99
8.1.280.0100.00725.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00320.95
8.1.230.0040.00820.75
8.1.220.0040.00417.74
8.1.210.0040.00418.85
8.1.200.0090.00017.48
8.1.190.0030.00517.52
8.1.180.0040.00418.10
8.1.170.0090.00019.02
8.1.160.0040.00418.98
8.1.150.0050.00318.70
8.1.140.0030.00517.68
8.1.130.0000.00717.93
8.1.120.0000.00717.68
8.1.110.0030.00617.64
8.1.100.0030.00517.53
8.1.90.0000.00717.65
8.1.80.0050.00317.54
8.1.70.0030.00317.54
8.1.60.0030.00617.77
8.1.50.0080.00317.74
8.1.40.0050.00317.70
8.1.30.0000.00817.77
8.1.20.0050.00517.75
8.1.10.0030.00517.71
8.1.00.0050.00317.58
8.0.300.0040.00420.02
8.0.290.0060.00317.00
8.0.280.0000.00718.41
8.0.270.0040.00417.18
8.0.260.0030.00516.91
8.0.250.0040.00417.11
8.0.240.0000.01117.09
8.0.230.0030.00617.02
8.0.220.0000.00717.14
8.0.210.0040.00417.09
8.0.200.0000.00717.11
8.0.190.0030.00617.14
8.0.180.0000.00716.98
8.0.170.0060.00317.09
8.0.160.0050.00217.11
8.0.150.0030.00617.02
8.0.140.0080.00317.07
8.0.130.0000.00613.56
8.0.120.0040.00417.02
8.0.110.0040.00417.11
8.0.100.0050.00317.00
8.0.90.0000.00816.94
8.0.80.0120.00917.14
8.0.70.0040.00416.88
8.0.60.0040.00417.14
8.0.50.0030.00517.09
8.0.30.0140.00817.39
8.0.20.0180.00217.15
8.0.10.0050.00317.06
8.0.00.0090.01117.04
7.4.330.0000.00513.09
7.4.320.0040.00416.83
7.4.300.0030.00316.73
7.4.290.0000.00816.75
7.4.280.0030.00616.75
7.4.270.0060.00316.76
7.4.260.0060.00013.52
7.4.250.0050.00316.73
7.4.240.0000.00716.66
7.4.230.0070.00016.86
7.4.220.0130.00616.80
7.4.210.0070.01216.85
7.4.200.0040.00416.84
7.4.190.0030.00417.01
7.4.160.0070.01016.77
7.4.150.0060.01216.80
7.4.140.0120.00816.67
7.4.130.0080.01016.74
7.4.120.0120.00616.70
7.4.110.0060.01716.80
7.4.100.0060.01216.72
7.4.90.0070.01416.60
7.4.80.0130.01016.64
7.4.70.0040.01416.47
7.4.60.0110.00616.75
7.4.50.0000.00516.71
7.4.40.0030.01016.62
7.4.30.0110.00716.63
7.4.00.0070.00714.88
7.3.330.0000.00613.56
7.3.320.0030.00313.50
7.3.310.0040.00416.49
7.3.300.0000.00716.41
7.3.290.0110.00616.47
7.3.280.0050.01116.50
7.3.270.0110.00716.50
7.3.260.0060.01216.69
7.3.250.0090.00916.66
7.3.240.0100.00716.97
7.3.230.0160.00316.69
7.3.210.0090.00916.75
7.3.200.0090.01219.39
7.3.190.0150.00816.61
7.3.180.0100.01316.58
7.3.170.0100.00716.57
7.3.160.0120.00616.95
7.3.120.0060.01215.10
7.2.330.0090.00916.80
7.2.320.0120.00616.90
7.2.310.0060.01616.82
7.2.300.0100.00716.77
7.2.290.0040.01316.85
7.1.70.0000.01117.30
7.1.60.0140.01019.40
7.1.50.0000.01416.91
7.1.00.0070.07022.47
7.0.200.0130.01015.16
7.0.140.0070.07321.98
7.0.120.0070.07022.27
7.0.60.0070.07019.95
7.0.50.0070.07717.95
7.0.40.0100.08720.18
7.0.30.0500.05020.19
7.0.20.0300.06720.21
7.0.10.0270.05320.17
7.0.00.0030.05720.16
5.6.280.0130.06321.02
5.6.210.0070.07720.63
5.6.200.0030.07018.19
5.6.190.0070.04720.58
5.6.180.0270.08720.46
5.6.170.0230.03720.56
5.6.160.0030.04720.46
5.6.150.0070.06318.16
5.6.140.0100.04018.20
5.6.130.0000.08718.16
5.6.120.0100.03321.10
5.6.110.0070.05321.00
5.6.100.0100.04020.96
5.6.90.0100.08320.97
5.6.80.0030.04320.43
5.6.70.3370.03020.42
5.5.350.0200.07020.50
5.5.340.0070.04017.96
5.5.330.0070.04320.38
5.5.320.0430.06720.38
5.5.310.0270.07320.34
5.5.300.0100.03318.02
5.5.290.0030.04317.98
5.5.280.0170.06320.87
5.5.270.0330.03020.75
5.5.260.0070.07020.77
5.5.250.0170.07320.47
5.5.240.0270.06020.29
5.4.450.0100.07719.52
5.4.440.0000.09019.52
5.4.430.0100.03719.20
5.4.420.0000.04319.44
5.4.410.0030.04019.45
5.4.400.0030.03719.14
5.4.390.0000.04019.22
5.4.380.0030.03719.25
5.4.370.0030.03718.86
5.4.360.0030.03719.09
5.4.350.0030.04019.25
5.4.340.0070.03319.25
5.4.320.0070.03319.24
5.4.310.0030.03718.88
5.4.300.0030.03719.15
5.4.290.0030.03718.88
5.4.280.0000.04019.08
5.4.270.0030.03719.01
5.4.260.0000.04019.25
5.4.250.0070.04319.15
5.4.240.0030.03718.92
5.4.230.0030.04319.15
5.4.220.0070.03319.07
5.4.210.0030.03718.85
5.4.200.0030.03719.24
5.4.190.0070.04019.16
5.4.180.0000.04019.15
5.4.170.0000.05318.85
5.4.160.0070.04719.23
5.4.150.0030.04318.84
5.4.140.0030.07716.55
5.4.130.0000.05016.41
5.4.120.0030.04016.26
5.4.110.0070.06016.41
5.4.100.0130.07016.28
5.4.90.0030.05016.40
5.4.80.0030.05716.41
5.4.70.0100.05016.41
5.4.60.0130.06716.27
5.4.50.0070.04316.62
5.4.40.0030.04316.38
5.4.30.0030.07016.36
5.4.20.0130.04316.64
5.4.10.0100.07316.39
5.4.00.0100.06715.95
5.3.290.0030.03714.59
5.3.280.0070.04014.60
5.3.270.0070.08314.69
5.3.260.0030.03714.66
5.3.250.0070.03314.62
5.3.240.0100.06314.77
5.3.230.0070.04314.77
5.3.220.0100.07314.57
5.3.210.0000.06014.57
5.3.200.0070.04314.65
5.3.190.0030.08014.57
5.3.180.0030.07714.59
5.3.170.0000.04314.73
5.3.160.0030.05714.48
5.3.150.0100.03314.57
5.3.140.0070.04014.57
5.3.130.0030.07714.59
5.3.120.0070.03714.71
5.3.110.0030.08014.60
5.3.100.0030.08014.10
5.3.90.0130.06014.08
5.3.80.0130.04714.08
5.3.70.0100.06714.18
5.3.60.0130.05714.02
5.3.50.0070.05314.02
5.3.40.0000.04314.11
5.3.30.0030.07313.92
5.3.20.0070.06013.63
5.3.10.0070.04313.63
5.3.00.0070.03013.72
5.2.170.0100.05311.05
5.2.160.0100.06011.12
5.2.150.0000.03311.20
5.2.140.0100.06311.10
5.2.130.0000.04311.18
5.2.120.0100.06011.15
5.2.110.0030.06011.18
5.2.100.0030.05711.07
5.2.90.0000.03011.17
5.2.80.0030.06011.12
5.2.70.0070.06011.20
5.2.60.0070.03711.07
5.2.50.0100.05710.99
5.2.40.0000.05011.08
5.2.30.0000.04711.14
5.2.20.0070.03010.98
5.2.10.0130.04711.01
5.2.00.0000.03310.80
5.1.60.0030.0279.98
5.1.50.0000.05710.09
5.1.40.0030.02710.05
5.1.30.0030.02710.26
5.1.20.0030.03710.52
5.1.10.0100.0509.99
5.1.00.0100.05010.11
5.0.50.0000.0378.54
5.0.40.0030.0378.38
5.0.30.0030.0378.21
5.0.20.0070.0438.28
5.0.10.0000.0278.10
5.0.00.0000.0678.15
4.4.90.0030.0207.70
4.4.80.0000.0337.70
4.4.70.0000.0207.70
4.4.60.0030.0337.70
4.4.50.0030.0337.70
4.4.40.0070.0437.70
4.4.30.0000.0207.70
4.4.20.0000.0237.70
4.4.10.0000.0377.70
4.4.00.0000.0407.70
4.3.110.0000.0237.70
4.3.100.0030.0377.70
4.3.90.0030.0207.70
4.3.80.0000.0537.70
4.3.70.0000.0337.70
4.3.60.0000.0407.70
4.3.50.0070.0237.70
4.3.40.0030.0407.70
4.3.30.0000.0207.70
4.3.20.0000.0307.70
4.3.10.0000.0407.70
4.3.00.0000.0277.70

preferences:
47.64 ms | 401 KiB | 5 Q