3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['Ù', 'é', '€']; $string = "é & Ù @ ♣ ☂ % & € À"; $acceptedChars = implode('', $arr); $string = preg_replace('/[^ -~' . $acceptedChars . ']/u', '', $string); echo 'Test : ' . $string;

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.0110.00416.73
8.3.50.0140.00416.70
8.3.40.0070.00718.92
8.3.30.0000.01418.81
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.180.0150.00325.92
8.2.170.0040.01119.21
8.2.160.0070.01022.96
8.2.150.0000.00725.66
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0050.00321.18
8.2.110.0070.00320.64
8.2.100.0040.00818.09
8.2.90.0040.00417.88
8.2.80.0050.00319.04
8.2.70.0040.00417.75
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0070.00018.22
8.2.30.0040.00418.14
8.2.20.0040.00418.04
8.2.10.0040.00419.39
8.2.00.0000.00819.34
8.1.280.0090.00625.92
8.1.270.0060.00323.99
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00321.98
8.1.230.0040.00817.82
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0000.00817.48
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0000.00718.95
8.1.150.0040.00418.87
8.1.140.0040.00418.95
8.1.130.0070.00020.21
8.1.120.0040.00417.68
8.1.110.0000.00717.48
8.1.100.0050.00217.50
8.1.90.0000.00717.50
8.1.80.0050.00517.59
8.1.70.0000.00717.60
8.1.60.0000.00817.74
8.1.50.0050.00317.56
8.1.40.0060.00617.59
8.1.30.0090.00017.82
8.1.20.0090.00017.81
8.1.10.0040.00417.68
8.1.00.0140.00717.58
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00718.46
8.0.270.0030.00318.15
8.0.260.0000.00618.50
8.0.250.0000.00717.19
8.0.240.0030.00317.15
8.0.230.0030.00317.16
8.0.220.0070.00017.09
8.0.210.0000.00717.04
8.0.200.0020.00517.12
8.0.190.0040.00417.04
8.0.180.0000.00717.03
8.0.170.0030.00517.18
8.0.160.0030.00317.12
8.0.150.0040.00416.98
8.0.140.0190.00317.10
8.0.130.0100.00415.21
8.0.120.0110.00517.05
8.0.110.0110.00317.09
8.0.100.0090.00417.00
8.0.90.0130.00117.06
8.0.80.0130.00717.02
8.0.70.0100.00517.07
8.0.60.0110.00316.91
8.0.50.0090.00517.02
8.0.30.0100.00917.07
8.0.20.0100.00917.18
8.0.10.0050.01517.18
8.0.00.0130.00417.16
7.4.330.0050.00016.86
7.4.320.0030.00316.77
7.4.300.0030.00316.66
7.4.290.0000.00816.67
7.4.280.0070.00016.74
7.4.270.0060.00416.60
7.4.260.0100.00515.05
7.4.250.0070.00816.62
7.4.240.0060.00616.68
7.4.230.0120.00516.60
7.4.220.0090.00216.66
7.4.210.0090.00716.68
7.4.200.0070.00616.81
7.4.190.0120.00816.74
7.4.180.0080.01116.71
7.4.160.0140.00616.56
7.4.150.0110.00816.63
7.4.140.0150.00416.57
7.4.130.0080.01016.64
7.4.120.0110.00816.67
7.4.110.0160.00216.65
7.4.100.0160.00316.69
7.4.90.0150.00616.63
7.4.80.0130.00516.48
7.4.70.0140.00516.63
7.4.60.0120.00716.73
7.4.50.0130.00516.56
7.4.40.0110.00716.59
7.4.30.0130.00916.62
7.4.20.0130.00416.61
7.4.10.0100.00716.55
7.4.00.0130.00316.59
7.3.330.0060.00516.46
7.3.320.0060.00614.98
7.3.310.0090.00516.34
7.3.300.0100.00216.40
7.3.290.0110.00916.44
7.3.280.0180.00016.31
7.3.270.0130.00616.43
7.3.260.0090.00716.38
7.3.250.0160.00316.38
7.3.240.0130.00516.67
7.3.230.0150.00516.41
7.3.220.0170.00316.31
7.3.210.0180.00516.49
7.3.200.0110.00916.28
7.3.190.0160.00316.52
7.3.180.0090.00916.26
7.3.170.0090.01016.22
7.3.160.0130.00616.48
7.3.150.0170.00416.51
7.3.140.0090.01016.31
7.3.130.0150.00316.28
7.3.120.0170.00316.49
7.3.110.0120.00716.40
7.3.100.0140.00516.37
7.3.90.0110.00816.50
7.3.80.0120.00716.36
7.3.70.0110.00716.55
7.3.60.0120.00616.60
7.3.50.0130.00616.50
7.3.40.0140.00516.57
7.3.30.0140.00616.46
7.3.20.0140.00617.50
7.3.10.0170.00317.29
7.3.00.0120.00717.42

preferences:
66.69 ms | 400 KiB | 5 Q