3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stripSpecialCharater($string) { $string = iconv("Windows-1252","UTF-8",urldecode($string)); $string = preg_replace(array('/\s{2,}/', '/[\t\n]/'), ' ', $string); return preg_replace('/[^a-zA-Z0-9ç&-©‚ƒ‘\s]/', '', $string); } $tests = ['12 34', 'adsf', 'co©', 'pound £']; foreach ($tests as $test) { echo "$test : " , stripSpecialCharater($test), "\n"; }

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.01118.78
8.3.50.0070.00716.81
8.3.40.0120.00419.12
8.3.30.0120.00318.88
8.3.20.0080.00021.73
8.3.10.0060.00320.91
8.3.00.0050.00319.50
8.2.180.0070.01118.91
8.2.170.0100.01019.00
8.2.160.0080.00622.96
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00021.08
8.2.110.0060.00321.04
8.2.100.0060.00619.82
8.2.90.0000.00818.26
8.2.80.0060.00317.97
8.2.70.0000.00817.80
8.2.60.0000.00718.22
8.2.50.0000.00818.10
8.2.40.0030.00619.46
8.2.30.0060.00319.35
8.2.20.0070.00018.18
8.2.10.0000.00819.50
8.2.00.0080.00018.06
8.1.280.0100.01025.92
8.1.270.0050.00220.29
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.91
8.1.230.0110.00022.64
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.25
8.1.190.0040.00417.47
8.1.180.0000.00818.10
8.1.170.0050.00318.77
8.1.160.0060.00318.93
8.1.150.0040.00418.94
8.1.140.0040.00418.91
8.1.130.0090.00021.86
8.1.120.0040.00417.62
8.1.110.0070.00417.61
8.1.100.0040.00417.53
8.1.90.0040.00417.57
8.1.80.0050.00317.66
8.1.70.0040.00417.57
8.1.60.0030.00617.64
8.1.50.0090.00017.56
8.1.40.0030.00617.67
8.1.30.0030.00517.80
8.1.20.0090.00017.75
8.1.10.0000.00717.60
8.1.00.0020.00517.49
8.0.300.0060.00319.85
8.0.290.0040.00416.88
8.0.280.0000.00718.47
8.0.270.0000.00717.29
8.0.260.0070.00018.43
8.0.250.0030.00317.16
8.0.240.0080.00017.06
8.0.230.0040.00417.03
8.0.220.0000.00717.13
8.0.210.0030.00317.10
8.0.200.0070.00017.06
8.0.190.0040.00417.22
8.0.180.0070.00317.04
8.0.170.0030.00617.09
8.0.160.0000.00817.09
8.0.150.0000.00716.97
8.0.140.0000.00717.06
8.0.130.0000.00513.42
8.0.120.0040.00417.07
8.0.110.0030.00617.28
8.0.100.0060.00317.32
8.0.90.0040.00417.25
8.0.80.0080.01417.25
8.0.70.0000.00817.08
8.0.60.0030.00617.25
8.0.50.0000.00917.21
8.0.30.0080.01317.39
8.0.20.0070.01717.15
8.0.10.0060.00317.36
8.0.00.0110.01217.15
7.4.330.0030.00315.55
7.4.320.0030.00516.87
7.4.300.0040.00416.86
7.4.290.0030.00316.69
7.4.280.0040.00416.77
7.4.270.0040.00416.69
7.4.260.0000.00916.88
7.4.250.0030.00617.01
7.4.240.0000.00916.95
7.4.230.0050.00317.12
7.4.220.0000.00916.85
7.4.210.0100.01216.96
7.4.200.0000.00917.13
7.4.160.0070.01116.89
7.4.140.0100.01017.86
7.4.130.0140.00917.08
7.4.120.0150.00616.77
7.4.110.0190.01016.79
7.4.100.0060.01416.84
7.4.90.0070.01816.82
7.4.80.0140.00619.39
7.4.70.0070.01716.80
7.4.60.0090.01116.76
7.4.50.0100.00816.69
7.4.40.0130.00616.91
7.4.30.0120.00616.92
7.4.20.0110.00816.61
7.4.10.0150.00616.77
7.4.00.0110.00915.83
7.3.330.0030.00313.38
7.3.320.0000.00513.34
7.3.310.0040.00416.67
7.3.300.0000.00816.47
7.3.290.0090.00016.61
7.3.280.0050.01216.63
7.3.260.0110.01216.81
7.3.240.0150.00816.77
7.3.230.0170.00316.97
7.3.210.0100.01016.61
7.3.200.0150.00416.65
7.3.190.0070.01416.80
7.3.180.0100.01116.72
7.3.170.0080.01516.80
7.3.160.0150.00516.93
7.3.150.0130.00616.91
7.3.140.0110.00616.69
7.3.130.0090.00916.66
7.3.120.0070.01016.16
7.3.110.0070.01516.23
7.3.100.0110.00515.96
7.3.90.0060.01216.11
7.3.80.0060.01416.03
7.3.70.0100.00715.78
7.3.60.0120.00716.06
7.3.50.0060.01215.92
7.3.40.0070.00815.90
7.3.30.0100.01216.06
7.3.20.0260.00716.31
7.3.10.0260.01216.16
7.3.00.0240.00816.39
7.2.330.0100.01617.09
7.2.320.0030.02116.95
7.2.310.0080.01317.08
7.2.300.0140.00717.00
7.2.290.0090.01217.02
7.2.280.0060.01317.07
7.2.270.0090.01216.95
7.2.260.0060.01217.13
7.2.250.0060.01316.30
7.2.240.0080.01416.10
7.2.230.0100.01116.20
7.2.220.0090.00816.22
7.2.210.0030.01516.25
7.2.200.0060.01116.24
7.2.190.0120.00816.10
7.2.180.0090.01016.08
7.2.170.0070.01016.13
7.2.160.0060.01516.15
7.2.150.0250.01316.63
7.2.140.0280.01116.58
7.2.130.0210.01316.61
7.2.120.0520.01116.59
7.2.110.0200.00916.56
7.2.100.0230.01216.59
7.2.90.0440.01116.58
7.2.80.0220.01216.71
7.2.70.0340.01616.66
7.2.60.0300.00916.55
7.2.50.0230.00916.60
7.2.40.0360.00916.50
7.2.30.0220.01316.54
7.2.20.0250.01016.57
7.2.10.0250.00916.54
7.2.00.0200.01316.51
7.1.330.0030.01715.99
7.1.320.0080.01016.06
7.1.310.0060.01016.13
7.1.300.0110.00916.06
7.1.290.0030.01916.01
7.1.280.0110.00915.97
7.1.270.0110.00916.11
7.1.260.0160.00616.15
7.1.250.0230.01015.47
7.1.240.0070.01215.99
7.1.230.0090.00816.15
7.1.220.0070.01216.06
7.1.210.0120.00716.05
7.1.200.0080.01315.91
7.1.190.0070.01016.11
7.1.180.0090.01115.98
7.1.170.0090.01016.13
7.1.160.0090.01016.11
7.1.150.0130.00716.13
7.1.140.0110.00516.02
7.1.130.0070.01315.99
7.1.120.0040.01515.90
7.1.110.0050.01116.07
7.1.100.0130.00716.16
7.1.90.0070.01216.05
7.1.80.0060.01216.13
7.1.70.0090.00916.01
7.1.60.0100.00816.00
7.1.50.0120.00815.98
7.1.40.0100.00915.89
7.1.30.0060.01115.95
7.1.20.0080.01116.01
7.1.10.0060.01116.08
7.1.00.0120.00515.98

preferences:
62.42 ms | 401 KiB | 5 Q