3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\x7F"; $result = preg_replace('~[\x{0000}-\x{001F}\x{007F}-\x{00a0}]~', '', $result); /* //reject overly long 2 byte sequences, as well as characters above U+10000 and replace with ? $result= preg_replace( '/[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})/S', '', $result ); */ echo $result;

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.00418.43
8.3.50.0070.01122.02
8.3.40.0070.00718.77
8.3.30.0070.00719.02
8.3.20.0070.00020.20
8.3.10.0050.00223.48
8.3.00.0040.00422.45
8.2.180.0070.01116.75
8.2.170.0110.00422.96
8.2.160.0120.00322.14
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00319.36
8.2.110.0060.00922.24
8.2.100.0070.00417.84
8.2.90.0040.00419.28
8.2.80.0000.00817.97
8.2.70.0040.00417.87
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0090.00018.22
8.2.30.0080.00018.07
8.2.20.0040.00417.91
8.2.10.0000.00817.80
8.2.00.0090.00018.00
8.1.280.0070.00725.92
8.1.270.0080.00022.20
8.1.260.0080.00026.35
8.1.250.0070.00728.09
8.1.240.0030.00723.80
8.1.230.0030.00819.05
8.1.220.0000.00717.79
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0060.00317.41
8.1.180.0040.00418.10
8.1.170.0080.00018.64
8.1.160.0020.00521.89
8.1.150.0000.00718.71
8.1.140.0050.00317.50
8.1.130.0070.00017.86
8.1.120.0030.00617.61
8.1.110.0000.00717.39
8.1.100.0000.00717.53
8.1.90.0000.00717.53
8.1.80.0000.00717.44
8.1.70.0000.00717.45
8.1.60.0030.00617.56
8.1.50.0050.00517.50
8.1.40.0000.00717.51
8.1.30.0030.00717.75
8.1.20.0000.00717.64
8.1.10.0040.00417.67
8.1.00.0000.00717.66
8.0.300.0070.00018.77
8.0.290.0000.00717.17
8.0.280.0030.00318.50
8.0.270.0000.00717.32
8.0.260.0000.00716.96
8.0.250.0000.00717.02
8.0.240.0090.00017.01
8.0.230.0060.00016.95
8.0.220.0070.00016.98
8.0.210.0030.00416.89
8.0.200.0030.00317.02
8.0.190.0000.00817.03
8.0.180.0030.00316.86
8.0.170.0000.00716.98
8.0.160.0000.00717.01
8.0.150.0070.00016.97
8.0.140.0070.00016.86
8.0.130.0030.00613.45
8.0.120.0000.00716.98
8.0.110.0070.00016.98
8.0.100.0000.00816.84
8.0.90.0050.00216.86
8.0.80.0060.00917.03
8.0.70.0000.00717.03
8.0.60.0040.00416.93
8.0.50.0040.00417.09
8.0.30.0130.01017.44
8.0.20.0060.01217.40
8.0.10.0000.00916.99
8.0.00.0120.00916.92
7.4.330.0060.00015.00
7.4.320.0030.00316.80
7.4.300.0030.00316.54
7.4.290.0000.00816.75
7.4.280.0030.00616.64
7.4.270.0100.00016.80
7.4.260.0030.00316.63
7.4.250.0040.00416.69
7.4.240.0050.00216.67
7.4.230.0030.00316.85
7.4.220.0090.00916.75
7.4.210.0110.00616.71
7.4.200.0000.00716.63
7.4.190.0000.00616.52
7.4.160.0090.00616.49
7.4.150.0170.00017.40
7.4.140.0120.00517.86
7.4.130.0110.00616.72
7.4.120.0090.01016.58
7.4.110.0130.00316.82
7.4.100.0120.00916.82
7.4.90.0070.01116.45
7.4.80.0100.00716.77
7.4.70.0000.01716.66
7.4.60.0100.00716.66
7.4.50.0040.00416.63
7.4.40.0060.01222.77
7.4.30.0060.01016.66
7.4.00.0030.01215.35
7.3.330.0000.00513.25
7.3.320.0020.00213.19
7.3.310.0030.00316.42
7.3.300.0000.00716.38
7.3.290.0060.01016.38
7.3.280.0080.00816.38
7.3.270.0070.01017.40
7.3.260.0070.01016.56
7.3.250.0110.00916.52
7.3.240.0140.00716.32
7.3.230.0100.00716.39
7.3.210.0180.00316.29
7.3.200.0090.01419.39
7.3.190.0120.00616.47
7.3.180.0060.01016.33
7.3.170.0120.00316.46
7.3.160.0100.00616.59
7.3.120.0070.00714.96
7.2.330.0120.00916.75
7.2.320.0070.01016.79
7.2.310.0120.00516.54
7.2.300.0110.00716.80
7.2.290.0130.00616.90
7.1.70.0040.00417.09
7.1.60.0110.01419.32
7.1.50.0160.00717.20
7.1.00.0000.08022.34
7.0.200.0100.00616.57
7.0.140.0070.06322.00
7.0.100.0300.07320.16
7.0.90.0030.08019.88
7.0.80.0170.06019.81
7.0.70.0030.08019.97
7.0.60.0070.04719.92
7.0.50.0070.04720.24
7.0.40.0100.07320.18
7.0.30.0100.04719.96
7.0.20.0130.04319.95
7.0.10.0000.08720.04
7.0.00.0200.07720.03
5.6.280.0100.06320.90
5.6.250.0100.08020.52
5.6.240.0100.04720.57
5.6.230.0130.04320.65
5.6.220.0130.07020.57
5.6.210.0100.08020.64
5.6.200.0130.08021.13
5.6.190.0070.04721.00
5.6.180.0030.08321.08
5.6.170.0030.06321.10
5.6.160.0030.07321.05
5.6.150.0070.08021.03
5.6.140.0130.08321.07
5.6.130.0100.09021.09
5.6.120.0070.05021.07
5.6.110.0070.09021.09
5.6.100.0030.09320.91
5.6.90.0170.07021.00
5.6.80.0130.07320.41
5.6.70.0030.09020.48
5.6.60.0170.07020.40
5.6.50.0130.03320.45
5.6.40.0130.04320.39
5.6.30.0100.07720.46
5.6.20.0070.06020.28
5.6.10.0130.07020.48
5.6.00.0170.06720.36
5.5.380.0100.05020.38
5.5.370.0070.07020.34
5.5.360.0000.09320.52
5.5.350.0030.07720.44
5.5.340.0070.08320.77
5.5.330.0130.07320.75
5.5.320.0030.07320.88
5.5.310.0070.08320.83
5.5.300.0100.07720.80
5.5.290.0000.08320.82
5.5.280.0100.07320.62
5.5.270.0070.05020.74
5.5.260.0170.07020.84
5.5.250.0100.06320.71
5.5.240.0100.08020.25
5.5.230.0030.05320.23
5.5.220.0130.08020.25
5.5.210.0130.07320.25
5.5.200.0070.08720.25
5.5.190.0000.06319.96
5.5.180.0030.05020.24
5.5.160.0100.04320.29
5.5.150.0070.07720.27
5.5.140.0070.07320.11
5.5.130.0130.07320.21
5.5.120.0100.04320.21
5.5.110.0170.07320.23
5.5.100.0100.04020.07
5.5.90.0170.05020.10
5.5.80.0100.06720.09
5.5.70.0100.07020.15
5.5.60.0030.07320.04
5.5.50.0100.06020.06
5.5.40.0030.08020.02
5.5.30.0070.04320.03
5.5.20.0170.04320.03
5.5.10.0070.07320.08
5.5.00.0130.04020.09
5.4.450.0000.08319.23
5.4.440.0130.07319.44
5.4.430.0100.07719.13
5.4.420.0070.07719.13
5.4.410.0130.03719.16
5.4.400.0030.04319.07
5.4.390.0030.08319.14
5.4.380.0070.05018.95
5.4.370.0100.04018.90
5.4.360.0170.07019.10
5.4.350.0030.08019.12
5.4.340.0130.07019.10
5.4.320.0170.06719.03
5.4.310.0130.03718.98
5.4.300.0070.08018.97
5.4.290.0130.07018.96
5.4.280.0070.08319.07
5.4.270.0100.06319.11
5.4.260.0070.07719.11
5.4.250.0100.06319.09
5.4.240.0070.04719.03
5.4.230.0070.04018.77
5.4.220.0000.04018.89
5.4.210.0030.08019.07
5.4.200.0130.04018.97
5.4.190.0030.04319.13
5.4.180.0100.07719.05
5.4.170.0000.08019.02
5.4.160.0070.07018.94
5.4.150.0100.07719.00
5.4.140.0070.06016.27
5.4.130.0070.03316.11
5.4.120.0030.04716.36
5.4.110.0100.06316.39
5.4.100.0070.07016.34
5.4.90.0030.07016.38
5.4.80.0030.04716.39
5.4.70.0130.04716.31
5.4.60.0030.05316.18
5.4.50.0030.07016.28
5.4.40.0070.07716.25
5.4.30.0130.06716.35
5.4.20.0030.04316.30
5.4.10.0070.06716.32
5.4.00.0130.06715.77
5.3.290.0030.06714.57
5.3.280.0030.06714.54
5.3.270.0030.07714.46
5.3.260.0130.07314.46
5.3.250.0170.07314.57
5.3.240.0070.04014.60
5.3.230.0100.08314.57
5.3.220.0000.05014.48
5.3.210.0030.07314.42
5.3.200.0030.05714.55
5.3.190.0070.05014.55
5.3.180.0070.06014.52
5.3.170.0070.07014.55
5.3.160.0130.07014.49
5.3.150.0100.08714.55
5.3.140.0130.06714.53
5.3.130.0170.08314.40
5.3.120.0100.07714.50
5.3.110.0030.08014.55
5.3.100.0130.06713.89
5.3.90.0200.05714.00
5.3.80.0070.04713.87
5.3.70.0100.07014.00
5.3.60.0130.06713.95
5.3.50.0030.07713.80
5.3.40.0100.05313.71
5.3.30.0100.05713.86
5.3.20.0170.05713.54
5.3.10.0130.06013.65
5.3.00.0070.07713.58
5.2.170.0030.05711.19
5.2.160.0070.06011.14
5.2.150.0000.05011.06
5.2.140.0070.06311.14
5.2.130.0030.03311.05
5.2.120.0030.04711.12
5.2.110.0100.06011.05
5.2.100.0070.03011.14
5.2.90.0070.05711.10
5.2.80.0070.05711.11
5.2.70.0030.04011.05
5.2.60.0070.06711.03
5.2.50.0100.04711.00
5.2.40.0070.03710.79
5.2.30.0070.06311.00
5.2.20.0000.06710.94
5.2.10.0100.05010.84
5.2.00.0130.04010.56
5.1.60.0070.0279.83
5.1.50.0070.0479.87
5.1.40.0000.0579.95
5.1.30.0070.05310.27
5.1.20.0170.04310.37
5.1.10.0030.0579.90
5.1.00.0030.0509.94
5.0.50.0000.0278.68
5.0.40.0030.0178.68
5.0.30.0070.0278.68
5.0.20.0000.0208.68
5.0.10.0000.0208.68
5.0.00.0000.0308.68
4.4.90.0070.0308.68
4.4.80.0000.0378.68
4.4.70.0000.0178.68
4.4.60.0030.0308.68
4.4.50.0000.0278.68
4.4.40.0030.0378.68
4.4.30.0030.0338.68
4.4.20.0000.0338.68
4.4.10.0030.0208.68
4.4.00.0030.0238.68
4.3.110.0030.0138.68
4.3.100.0030.0208.68
4.3.90.0070.0108.68
4.3.80.0000.0278.68
4.3.70.0000.0178.68
4.3.60.0030.0138.68
4.3.50.0000.0178.68
4.3.40.0030.0208.68
4.3.30.0000.0138.68
4.3.20.0070.0078.68
4.3.10.0000.0138.68
4.3.00.0000.0138.68

preferences:
39.82 ms | 401 KiB | 5 Q