3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseStopWords($text){ $text = preg_replace('/[^a-zA-Z0-9áéíóúñÁÉÍÓÚÑ¡\¿\', ]/i','',$text); $stopwords = array('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); $text = str_replace(" a ", "", $text); return $text; } echo parseStopWords('¿Qué ha sido de nuestra niñez?');

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.40.0120.00318.70
8.3.30.0070.01018.88
8.3.20.0070.00318.95
8.3.10.0060.00320.61
8.3.00.0040.00417.50
8.2.170.0150.00022.96
8.2.160.0100.00322.29
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0060.00319.93
8.2.110.0070.01021.24
8.2.100.0040.00817.91
8.2.90.0040.00419.30
8.2.80.0000.00817.97
8.2.70.0070.00617.75
8.2.60.0090.00018.04
8.2.50.0090.00018.07
8.2.40.0000.00918.28
8.2.30.0040.00418.14
8.2.20.0040.00417.78
8.2.10.0050.00317.87
8.2.00.0000.00818.07
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0110.00022.64
8.1.230.0060.00621.07
8.1.220.0040.00418.77
8.1.210.0060.00318.97
8.1.200.0060.00317.60
8.1.190.0040.00417.53
8.1.180.0030.00618.10
8.1.170.0030.00618.87
8.1.160.0000.00718.97
8.1.150.0080.00018.84
8.1.140.0000.00817.66
8.1.130.0000.00717.90
8.1.120.0000.00717.73
8.1.110.0000.00817.57
8.1.100.0000.00717.69
8.1.90.0040.00417.72
8.1.80.0030.00517.70
8.1.70.0000.00717.55
8.1.60.0050.00417.82
8.1.50.0060.00317.66
8.1.40.0000.00917.64
8.1.30.0030.00517.86
8.1.20.0060.00317.79
8.1.10.0000.00817.66
8.1.00.0050.00317.52
8.0.300.0080.00020.10
8.0.290.0060.00316.86
8.0.280.0030.00318.44
8.0.270.0040.00417.38
8.0.260.0080.00018.81
8.0.250.0040.00417.22
8.0.240.0000.01017.13
8.0.230.0030.00517.12
8.0.220.0040.00416.99
8.0.210.0030.00516.97
8.0.200.0000.00717.17
8.0.190.0000.00717.03
8.0.180.0040.00417.00
8.0.170.0000.01017.01
8.0.160.0030.00417.07
8.0.150.0000.00917.03
8.0.140.0000.00716.96
8.0.130.0000.00713.48
8.0.120.0000.00817.09
8.0.110.0040.00416.93
8.0.100.0000.00816.96
8.0.90.0000.00717.08
8.0.80.0100.00717.07
8.0.70.0050.00316.99
8.0.60.0030.00517.14
8.0.50.0040.00416.97
8.0.30.0100.01317.24
8.0.20.0090.00917.32
8.0.10.0040.00417.01
8.0.00.0110.01017.16
7.4.330.0000.00515.11
7.4.320.0030.00316.78
7.4.300.0030.00516.78
7.4.290.0020.00516.71
7.4.280.0030.00716.75
7.4.270.0030.00516.84
7.4.260.0070.00013.50
7.4.250.0040.00416.91
7.4.240.0040.00416.82
7.4.230.0000.00716.77
7.4.220.0140.00716.73
7.4.210.0110.00816.84
7.4.200.0050.00316.57
7.4.190.0080.00016.72
7.4.160.0090.01316.73
7.4.150.0070.01117.07
7.4.140.0120.01017.30
7.4.130.0080.01016.87
7.4.120.0130.00716.77
7.4.110.0150.00416.55
7.4.100.0140.00517.03
7.4.90.0070.01016.76
7.4.80.0130.01918.80
7.4.70.0070.01116.74
7.4.60.0120.00616.59
7.4.50.0040.00416.77
7.4.40.0090.00622.27
7.4.30.0060.01016.98
7.4.00.0050.01315.23
7.3.330.0000.00713.50
7.3.320.0070.00013.31
7.3.310.0040.00416.50
7.3.300.0050.00216.44
7.3.290.0040.01116.50
7.3.280.0080.01016.48
7.3.270.0110.00717.18
7.3.260.0080.01018.24
7.3.250.0150.00316.57
7.3.240.0110.00716.82
7.3.230.0170.00016.54
7.3.210.0030.01616.87
7.3.200.0070.01019.39
7.3.190.0080.01116.62
7.3.180.0090.00616.77
7.3.170.0080.00916.59
7.3.160.0100.00616.90
7.3.120.0070.00815.00
7.3.110.0080.00714.96
7.3.100.0020.01015.26
7.3.90.0030.01315.16
7.3.80.0070.00515.00
7.3.70.0060.00515.12
7.3.60.0070.00714.97
7.3.50.0050.00815.12
7.3.40.0040.01114.89
7.3.30.0060.00815.01
7.3.20.0020.01416.96
7.3.10.0040.00816.74
7.3.00.0020.01116.87
7.2.330.0100.01016.81
7.2.320.0150.00316.89
7.2.310.0140.00916.90
7.2.300.0090.01416.96
7.2.290.0000.01816.91
7.2.250.0030.01315.12
7.2.240.0070.01015.34
7.2.230.0040.00915.33
7.2.220.0100.00415.27
7.2.210.0030.01015.19
7.2.200.0090.00515.15
7.2.190.0120.00615.20
7.2.180.0030.01115.28
7.2.170.0050.01115.18
7.2.160.0030.01415.34
7.2.150.0120.00317.09
7.2.140.0030.01017.21
7.2.130.0030.01017.08
7.2.120.0110.00617.04
7.2.110.0050.01017.25
7.2.100.0050.00817.06
7.2.90.0060.00817.11
7.2.80.0030.01017.15
7.2.70.0080.00317.29
7.2.60.0090.00517.12
7.2.50.0080.00617.26
7.2.40.0030.00917.18
7.2.30.0060.00917.07
7.2.20.0060.00817.05
7.2.10.0080.00317.23
7.2.00.0080.00717.88
7.1.330.0100.00316.13
7.1.320.0050.00516.14
7.1.310.0030.00816.08
7.1.300.0060.01115.96
7.1.290.0080.00315.80
7.1.280.0050.00916.01
7.1.270.0080.00415.96
7.1.260.0010.01316.05
7.1.250.0050.01016.07
7.1.100.0030.01018.19
7.1.70.0000.00817.39
7.1.60.0130.01019.40
7.1.50.0030.01917.34
7.1.00.0030.05722.50
7.0.200.0040.00416.96
7.0.140.0070.07022.10
7.0.60.0100.07720.10
7.0.50.0070.08318.00
7.0.40.0100.05320.32
7.0.30.0200.04320.14
7.0.20.0170.08720.16
7.0.10.0170.07720.14
7.0.00.0070.08320.14
5.6.210.0000.04720.54
5.6.200.0000.09018.24
5.6.190.0030.05020.55
5.6.180.3200.04020.58
5.6.170.0300.04320.50
5.6.160.0070.05020.55
5.6.150.0100.07318.16
5.6.140.0070.08018.28
5.6.130.0070.06018.18
5.6.120.0030.05021.00
5.6.110.0030.04021.13
5.6.100.0030.09021.03
5.6.90.0100.06020.97
5.6.80.0100.08020.40
5.5.350.0270.08020.36
5.5.340.0070.06718.09
5.5.330.0000.09020.32
5.5.320.0400.05720.33
5.5.310.0130.04320.29
5.5.300.0100.08018.07
5.5.290.0030.08018.07
5.5.280.0100.05020.89
5.5.270.0130.07720.79
5.5.260.0130.08020.68
5.5.250.0030.08320.80
5.5.240.0100.04720.16
5.4.450.0100.05019.42
5.4.440.0170.06019.46
5.4.430.0030.04019.48
5.4.420.0030.05019.41
5.4.410.0030.08019.13
5.4.400.0100.05719.25
5.4.390.0130.04319.16
5.4.380.0030.07019.13
5.4.370.0070.07718.88
5.4.360.0130.06018.93
5.4.350.0100.07319.23
5.4.340.0070.07019.25
5.4.320.0030.05018.93
5.4.310.0100.04319.21
5.4.300.0030.08318.86
5.4.290.0100.08018.86
5.4.280.0030.06318.86
5.4.270.0170.03719.15
5.4.260.0030.07019.15
5.4.250.0070.05019.08
5.4.240.0070.05018.92
5.4.230.0030.04018.97
5.4.220.0070.03719.14
5.4.210.0070.05319.24
5.4.200.0030.04019.14
5.4.190.0100.07319.08
5.4.180.0100.03319.20
5.4.170.0030.04319.11
5.4.160.0030.08018.86
5.4.150.0000.04719.23
5.4.140.0070.07016.32
5.4.130.0000.05016.38
5.4.120.0100.07716.37
5.4.110.0030.04316.41
5.4.100.0030.04716.30
5.4.90.0000.07316.30
5.4.80.0200.06016.40
5.4.70.0000.07716.26
5.4.60.0000.05016.36
5.4.50.0100.05716.38
5.4.40.0100.04716.40
5.4.30.0000.05316.31
5.4.20.0170.06316.36
5.4.10.0100.03716.46
5.4.00.0100.03315.89
5.3.290.0070.07714.83
5.3.280.0030.08014.60
5.3.270.0030.04714.69
5.3.260.0030.07714.68
5.3.250.0030.04314.64
5.3.240.0100.05014.50
5.3.230.0030.06014.60
5.3.220.0070.03714.65
5.3.210.0070.04314.50
5.3.200.0030.04714.64
5.3.190.0030.07714.61
5.3.180.0030.07714.72
5.3.170.0000.08014.64
5.3.160.0030.04314.59
5.3.150.0070.07714.57
5.3.140.0030.07314.57
5.3.130.0030.05014.62
5.3.120.0070.03714.63
5.3.110.0100.05314.61
5.3.100.0130.06714.08
5.3.90.0030.05714.10
5.3.80.0100.05714.04
5.3.70.0100.06313.99
5.3.60.0100.06014.01
5.3.50.0070.05714.02
5.3.40.0030.06314.04
5.3.30.0100.04314.00
5.3.20.0070.05313.65
5.3.10.0070.04313.71
5.3.00.0000.05313.71
5.2.170.0030.05011.16
5.2.160.0030.03311.16
5.2.150.0030.04011.12
5.2.140.0000.05011.15
5.2.130.0000.03711.01
5.2.120.0070.05311.05
5.2.110.0030.06011.02
5.2.100.0000.03711.16
5.2.90.0000.04311.11
5.2.80.0030.04311.14
5.2.70.0030.04011.01
5.2.60.0070.04710.98
5.2.50.0070.04010.98
5.2.40.0000.03711.05
5.2.30.0070.03311.14
5.2.20.0000.04311.00
5.2.10.0030.05710.96
5.2.00.0070.04010.69
5.1.60.0070.04310.01
5.1.50.0030.03010.16
5.1.40.0070.03010.04
5.1.30.0000.04010.34
5.1.20.0130.05310.25
5.1.10.0070.05010.06
5.1.00.0070.0479.99
5.0.50.0030.0438.59
5.0.40.0070.0408.59
5.0.30.0030.0608.59
5.0.20.0030.0378.59
5.0.10.0030.0478.59
5.0.00.0070.0638.59
4.4.90.0000.0378.59
4.4.80.0000.0378.59
4.4.70.0000.0238.59
4.4.60.0000.0308.59
4.4.50.0000.0378.59
4.4.40.0000.0578.59
4.4.30.0000.0308.59
4.4.20.0030.0278.59
4.4.10.0070.0178.59
4.4.00.0000.0308.59
4.3.110.0100.0278.59
4.3.100.0030.0238.59
4.3.90.0030.0208.59
4.3.80.0030.0578.59
4.3.70.0030.0338.59
4.3.60.0070.0138.59
4.3.50.0000.0278.59
4.3.40.0030.0478.59
4.3.30.0030.0308.59
4.3.20.0000.0308.59
4.3.10.0000.0338.59
4.3.00.0000.0378.59

preferences:
43.16 ms | 400 KiB | 5 Q