3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = '"CABA├â?A ""LA CACHIMBA"" DE INES BO'; function decodeTildes($cadena) { return str_replace(array('&aacute;', '&eacute;', '&iacute;', '&oacute;', '&uacute;', '&ntilde;', '&Aacute;', '&Eacute;', '&Iacute;', '&Oacute;', '&Uacute;', '&Ntilde;', '&deg;', '&quot;'), array('á', 'é', 'í', 'ó', 'ú', 'ñ', 'Á', 'É', 'Í', 'Ó', 'Ú', 'Ñ', '°', '"'), $cadena); } function clean($string) { $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. } echo clean($a);

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.70.0120.00918.56
8.3.60.0070.01018.43
8.3.50.0110.00921.23
8.3.40.0090.00518.84
8.3.30.0120.00318.74
8.3.20.0060.00320.34
8.3.10.0040.00423.63
8.3.00.0040.00422.38
8.2.190.0170.00316.88
8.2.180.0090.01316.50
8.2.170.0000.01422.96
8.2.160.0120.00820.43
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00317.75
8.2.110.0060.00321.08
8.2.100.0040.00817.75
8.2.90.0060.00319.05
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0090.00018.04
8.2.50.0000.00818.07
8.2.40.0000.00921.25
8.2.30.0000.00819.81
8.2.20.0040.00417.87
8.2.10.0040.00418.13
8.2.00.0030.00618.13
8.1.280.0100.00325.92
8.1.270.0030.00620.38
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0050.00522.70
8.1.230.0040.00817.42
8.1.220.0000.00917.79
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0030.00517.13
8.1.180.0080.00018.10
8.1.170.0000.00818.66
8.1.160.0000.00721.88
8.1.150.0040.00418.79
8.1.140.0000.00817.52
8.1.130.0030.00317.55
8.1.120.0050.00317.54
8.1.110.0000.00817.42
8.1.100.0050.00217.43
8.1.90.0070.00017.55
8.1.80.0060.00317.54
8.1.70.0040.00417.46
8.1.60.0040.00417.69
8.1.50.0000.00817.70
8.1.40.0030.00717.63
8.1.30.0000.00817.79
8.1.20.0060.00317.80
8.1.10.0040.00417.63
8.1.00.0000.00817.58
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0040.00418.39
8.0.270.0000.00717.30
8.0.260.0070.00017.24
8.0.250.0000.00917.10
8.0.240.0000.00717.06
8.0.230.0000.00717.00
8.0.220.0000.00816.93
8.0.210.0000.00716.92
8.0.200.0000.00817.03
8.0.190.0090.00016.94
8.0.180.0050.00316.97
8.0.170.0070.00317.00
8.0.160.0000.00716.96
8.0.150.0040.00416.97
8.0.140.0000.01016.85
8.0.130.0050.00013.43
8.0.120.0040.00416.94
8.0.110.0070.00016.95
8.0.100.0070.00016.83
8.0.90.0000.00716.86
8.0.80.0120.00416.96
8.0.70.0050.00316.86
8.0.60.0050.00216.96
8.0.50.0000.00716.96
8.0.30.0130.00517.29
8.0.20.0120.00717.40
8.0.10.0020.00516.93
8.0.00.0090.01016.77
7.4.330.0020.00215.08
7.4.320.0000.00616.78
7.4.300.0030.00316.74
7.4.290.0000.00816.80
7.4.280.0040.00416.79
7.4.270.0000.00816.80
7.4.260.0060.00316.73
7.4.250.0050.00316.68
7.4.240.0020.00516.64
7.4.230.0070.00016.87
7.4.220.0100.00716.82
7.4.210.0120.00616.86
7.4.200.0050.00216.69
7.4.160.0090.00616.77
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0090.00916.62
7.4.120.0050.01116.58
7.4.110.0100.00616.86
7.4.100.0080.01116.39
7.4.90.0110.00716.78
7.4.80.0150.00619.39
7.4.70.0060.01516.55
7.4.60.0160.00016.79
7.4.50.0030.00316.52
7.4.40.0100.00616.57
7.4.30.0130.00716.61
7.4.00.0070.01014.95
7.3.330.0000.00513.37
7.3.320.0050.00013.24
7.3.310.0000.00716.25
7.3.300.0000.00616.38
7.3.290.0060.01016.34
7.3.280.0060.00916.35
7.3.270.0120.01217.40
7.3.260.0100.00716.64
7.3.250.0130.00416.48
7.3.240.0100.00716.37
7.3.230.0060.01116.63
7.3.210.0030.01316.81
7.3.200.0100.01019.39
7.3.190.0070.01016.65
7.3.180.0130.00316.62
7.3.170.0070.01016.69
7.3.160.0070.01016.29
7.2.330.0140.00316.86
7.2.320.0090.01016.77
7.2.310.0120.00616.55
7.2.300.0090.00916.84
7.2.290.0030.01716.73
7.2.60.0040.01117.03
7.2.00.0120.00919.67
7.1.200.0040.01115.99
7.1.100.0030.00718.51
7.1.70.0040.00417.30
7.1.60.0130.01020.03
7.1.50.0080.00317.10
7.1.00.0070.07322.41
7.0.200.0130.00316.97
7.0.60.0130.08321.70
7.0.50.0070.03717.89
7.0.40.0070.07020.13
7.0.30.0370.07020.17
7.0.20.0200.06720.27
7.0.10.0100.05720.24
7.0.00.0070.06320.25
5.6.280.0030.07321.12
5.6.210.0070.08020.54
5.6.200.0170.07018.14
5.6.190.0130.08320.68
5.6.180.0170.04720.41
5.6.170.0270.04720.47
5.6.160.0070.09320.51
5.6.150.0130.06318.15
5.6.140.0130.08018.24
5.6.130.0100.08018.17
5.6.120.0030.08020.91
5.6.110.0200.07721.05
5.6.100.0070.08721.14
5.6.90.0170.08020.98
5.6.80.0100.04020.39
5.5.350.0270.07020.34
5.5.340.0070.05317.95
5.5.330.0070.04020.40
5.5.320.0170.04320.25
5.5.310.0230.08320.34
5.5.300.0070.03717.95
5.5.290.0030.04017.99
5.5.280.0130.03720.82
5.5.270.0230.07020.78
5.5.260.0200.07320.66
5.5.250.0200.07320.71
5.5.240.0200.08020.27
5.4.450.0800.04719.46
5.4.440.0670.06019.61
5.4.430.0700.05319.59
5.4.420.0700.06719.61
5.4.410.0630.05319.44
5.4.400.0730.06018.97
5.4.390.0530.05019.15
5.4.380.0570.06719.13
5.4.370.0600.05019.25
5.4.360.0470.05319.08
5.4.350.0570.04719.15
5.4.340.0270.05019.27
5.4.320.0230.05319.24
5.4.310.0170.05018.83
5.4.300.0770.05319.05
5.4.290.0630.05319.13
5.4.280.0770.04319.27
5.4.270.0730.05319.11
5.4.260.0500.05319.01
5.4.250.0700.05318.83
5.4.240.0700.06019.35
5.4.230.0730.05319.00
5.4.220.0830.04719.10
5.4.210.0770.05319.03
5.4.200.0630.05316.92
5.4.190.0670.05718.93
5.4.180.0770.05319.29
5.4.170.0470.06018.86
5.4.160.0270.06319.11
5.4.150.0470.04319.22
5.4.140.0130.05316.42
5.4.130.0430.05716.41
5.4.120.0800.05016.31
5.4.110.0870.04716.41
5.4.100.0870.05016.57
5.4.90.0700.05716.39
5.4.80.0930.05016.41
5.4.70.0700.05316.38
5.4.60.0200.04316.43
5.4.50.0100.05716.23
5.4.40.0200.06016.34
5.4.30.0300.06716.47
5.4.20.0400.05716.22

preferences:
60.14 ms | 401 KiB | 5 Q