3v4l.org

run code in 300+ PHP versions simultaneously
<?php function clean($string) { $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. } $a = "COLÃ?N 1391"; 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.60.0150.00618.56
8.3.50.0080.01421.38
8.3.40.0110.00718.67
8.3.30.0110.00318.68
8.3.20.0060.00920.21
8.3.10.0040.00423.63
8.3.00.0080.00022.44
8.2.180.0110.01116.63
8.2.170.0140.00722.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00417.63
8.2.110.0040.00422.13
8.2.100.0120.00017.88
8.2.90.0040.00419.13
8.2.80.0030.00617.97
8.2.70.0030.00617.88
8.2.60.0000.00817.93
8.2.50.0000.00918.07
8.2.40.0080.00021.09
8.2.30.0000.00719.85
8.2.20.0070.00017.71
8.2.10.0000.00718.02
8.2.00.0080.00017.95
8.1.280.0090.00925.92
8.1.270.0110.00720.34
8.1.260.0030.00626.35
8.1.250.0060.00328.09
8.1.240.0090.00022.50
8.1.230.0070.00417.66
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0080.00017.35
8.1.190.0030.00617.35
8.1.180.0040.00418.10
8.1.170.0050.00318.73
8.1.160.0040.00421.86
8.1.150.0040.00418.74
8.1.140.0040.00417.50
8.1.130.0030.00517.60
8.1.120.0070.00017.46
8.1.110.0040.00417.59
8.1.100.0000.00817.53
8.1.90.0000.00717.54
8.1.80.0070.00017.45
8.1.70.0040.00417.42
8.1.60.0040.00417.73
8.1.50.0000.00817.62
8.1.40.0000.00917.69
8.1.30.0030.00517.82
8.1.20.0060.00317.68
8.1.10.0030.00617.67
8.1.00.0050.00217.48
8.0.300.0070.00018.77
8.0.290.0070.00016.88
8.0.280.0030.00318.44
8.0.270.0000.00717.13
8.0.260.0060.00017.27
8.0.250.0040.00417.11
8.0.240.0040.00416.97
8.0.230.0040.00417.02
8.0.220.0070.00016.87
8.0.210.0030.00316.98
8.0.200.0000.00617.03
8.0.190.0000.00816.91
8.0.180.0040.00416.93
8.0.170.0000.00716.97
8.0.160.0040.00416.98
8.0.150.0040.00416.93
8.0.140.0030.00316.88
8.0.130.0030.00613.38
8.0.120.0000.00816.93
8.0.110.0000.00716.90
8.0.100.0040.00416.91
8.0.90.0080.00016.97
8.0.80.0040.01116.93
8.0.70.0000.00716.79
8.0.60.0000.00716.85
8.0.50.0000.00716.91
8.0.30.0120.00617.15
8.0.20.0130.00617.45
8.0.10.0000.00716.91
8.0.00.0100.00916.76
7.4.330.0050.00015.09
7.4.320.0040.00416.63
7.4.300.0000.00616.55
7.4.290.0000.00816.80
7.4.280.0070.00416.82
7.4.270.0030.00316.79
7.4.260.0040.00416.78
7.4.250.0070.00016.69
7.4.240.0020.00516.84
7.4.230.0030.00316.89
7.4.220.0130.00316.91
7.4.210.0110.00316.91
7.4.200.0000.00716.71
7.4.160.0120.00316.72
7.4.150.0110.00717.40
7.4.140.0100.01017.86
7.4.130.0110.01016.58
7.4.120.0130.01016.51
7.4.110.0130.00316.80
7.4.100.0120.01216.54
7.4.90.0030.01416.71
7.4.80.0100.01319.39
7.4.70.0150.00316.70
7.4.60.0120.00416.77
7.4.50.0000.00816.60
7.4.40.0120.00616.51
7.4.30.0130.01016.57
7.4.00.0030.01314.88
7.3.330.0000.00713.23
7.3.320.0060.00013.34
7.3.310.0070.00016.39
7.3.300.0030.00316.38
7.3.290.0130.00616.38
7.3.280.0090.00716.39
7.3.270.0120.00417.40
7.3.260.0100.01416.39
7.3.250.0110.00816.46
7.3.240.0200.00416.79
7.3.230.0180.00016.41
7.3.210.0040.01416.46
7.3.200.0090.00919.39
7.3.190.0080.00816.34
7.3.180.0090.01316.47
7.3.170.0090.01216.41
7.3.160.0060.01316.72
7.2.330.0080.00816.82
7.2.320.0090.01416.84
7.2.310.0140.00316.63
7.2.300.0070.01016.82
7.2.290.0140.00716.70
7.2.00.0040.01119.82
7.1.100.0110.00818.37
7.1.70.0080.00017.36
7.1.60.0100.01420.03
7.1.50.0000.02117.13
7.1.00.0000.08022.57
7.0.200.0350.00314.97
7.0.60.0070.06720.04
7.0.50.0030.05717.88
7.0.40.0130.08020.28
7.0.30.0170.05320.23
7.0.20.0300.04020.24
7.0.10.0130.08020.16
7.0.00.0070.04320.25
5.6.280.0030.06321.02
5.6.210.0170.07020.48
5.6.200.0030.04018.16
5.6.190.0130.03720.57
5.6.180.0200.07320.57
5.6.170.0300.05020.45
5.6.160.0030.08020.56
5.6.150.0030.04318.29
5.6.140.0100.07718.20
5.6.130.0130.06018.18
5.6.120.0100.04020.99
5.6.110.0070.08321.00
5.6.100.0030.08720.98
5.6.90.0000.06021.02
5.6.80.0200.06020.49
5.6.70.4500.04020.52
5.5.350.0330.07320.39
5.5.340.0030.05717.92
5.5.330.0070.04020.13
5.5.320.0370.05020.36
5.5.310.0400.07020.27
5.5.300.0270.06318.04
5.5.290.0000.05318.07
5.5.280.0130.06320.98
5.5.270.0130.03720.84
5.5.260.0030.07720.76
5.5.250.0100.04020.62
5.5.240.0270.07720.19
5.4.450.0800.05719.70
5.4.440.0830.06719.48
5.4.430.0870.05019.58
5.4.420.0670.05719.70
5.4.410.1070.04719.34
5.4.400.1000.06018.84
5.4.390.0730.05319.15
5.4.380.0770.05319.11
5.4.370.0800.05319.15
5.4.360.0830.05319.29
5.4.350.0770.06319.15
5.4.340.0630.05719.12
5.4.320.0670.06019.23
5.4.310.0870.04719.02
5.4.300.0670.05019.25
5.4.290.0570.06319.15
5.4.280.0770.05718.86
5.4.270.1030.07019.14
5.4.260.0830.03718.98
5.4.250.0600.05318.83
5.4.240.0700.05019.11
5.4.230.0730.05318.97
5.4.220.0900.05019.07
5.4.210.0730.05019.01
5.4.200.0770.04316.79
5.4.190.0700.05019.23
5.4.180.0670.05719.13
5.4.170.0670.05719.13
5.4.160.0730.04719.02
5.4.150.0730.05019.32
5.4.140.0630.06016.61
5.4.130.0930.06716.59
5.4.120.0730.04316.43
5.4.110.0830.03716.75
5.4.100.0900.06016.47
5.4.90.0870.06316.45
5.4.80.0930.04716.41
5.4.70.0800.04016.37
5.4.60.0070.03016.17
5.4.50.0030.04016.14
5.4.40.0100.04016.33
5.4.30.0300.06716.30
5.4.20.0130.04716.34

preferences:
72.23 ms | 401 KiB | 5 Q