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}]~S', '', $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.40.0100.01018.85
8.3.30.0090.00619.02
8.3.20.0090.00020.38
8.3.10.0050.00323.53
8.3.00.0040.00420.82
8.2.170.0120.00922.96
8.2.160.0070.00722.43
8.2.150.0080.00024.18
8.2.140.0090.00924.66
8.2.130.0000.00726.16
8.2.120.0050.00319.48
8.2.110.0060.00322.23
8.2.100.0040.00717.84
8.2.90.0060.00317.86
8.2.80.0030.00517.97
8.2.70.0050.00317.75
8.2.60.0080.00017.80
8.2.50.0030.00718.07
8.2.40.0070.00018.03
8.2.30.0000.00717.96
8.2.20.0000.00717.87
8.2.10.0000.00717.77
8.2.00.0040.00417.92
8.1.270.0110.00723.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.59
8.1.230.0090.00321.03
8.1.220.0040.00417.78
8.1.210.0090.00018.97
8.1.200.0000.00817.35
8.1.190.0080.00017.46
8.1.180.0070.00318.10
8.1.170.0040.00418.71
8.1.160.0050.00222.02
8.1.150.0040.00418.65
8.1.140.0050.00317.60
8.1.130.0000.00717.77
8.1.120.0030.00317.60
8.1.110.0040.00417.50
8.1.100.0000.00717.58
8.1.90.0000.00917.58
8.1.80.0000.00817.46
8.1.70.0030.00517.51
8.1.60.0000.00717.50
8.1.50.0040.00417.57
8.1.40.0040.00417.51
8.1.30.0040.00417.61
8.1.20.0040.00417.59
8.1.10.0040.00417.61
8.1.00.0070.00017.59
8.0.300.0030.00620.00
8.0.290.0030.00517.18
8.0.280.0000.00718.33
8.0.270.0030.00317.28
8.0.260.0000.00616.91
8.0.250.0000.00717.13
8.0.240.0070.00016.99
8.0.230.0030.00316.95
8.0.220.0060.00016.93
8.0.210.0040.00417.00
8.0.200.0030.00316.91
8.0.190.0000.00917.07
8.0.180.0050.00216.89
8.0.170.0030.00617.03
8.0.160.0040.00417.05
8.0.150.0040.00416.96
8.0.140.0000.00717.00
8.0.130.0030.00313.45
8.0.120.0000.00716.91
8.0.110.0000.00717.04
8.0.100.0050.00317.00
8.0.90.0050.00217.02
8.0.80.0070.01116.92
8.0.70.0050.00317.02
8.0.60.0040.00417.04
8.0.50.0000.00716.86
8.0.30.0110.00916.96
8.0.20.0120.00717.47
8.0.10.0040.00417.13
8.0.00.0080.01216.98
7.4.330.0050.00015.00
7.4.320.0060.00016.66
7.4.300.0030.00316.70
7.4.290.0070.00316.75
7.4.280.0030.00316.69
7.4.270.0000.00716.76
7.4.260.0070.00016.57
7.4.250.0040.00416.67
7.4.240.0040.00416.71
7.4.230.0030.00316.58
7.4.220.0120.00616.78
7.4.210.0130.00216.75
7.4.200.0000.00716.49
7.4.190.0030.00316.60
7.4.160.0100.00716.77
7.4.150.0090.00917.40
7.4.140.0050.01317.86
7.4.130.0110.00616.64
7.4.120.0100.00716.72
7.4.110.0070.01416.72
7.4.100.0040.01416.62
7.4.90.0170.00016.55
7.4.80.0000.01616.66
7.4.70.0090.00916.86
7.4.60.0090.00916.82
7.4.50.0050.00016.65
7.4.40.0090.00622.77
7.4.30.0090.00916.61
7.4.00.0110.00314.96
7.3.330.0060.00013.18
7.3.320.0000.00513.19
7.3.310.0000.00716.36
7.3.300.0030.00316.26
7.3.290.0000.01816.36
7.3.280.0080.00816.33
7.3.270.0060.01117.40
7.3.260.0120.00516.34
7.3.250.0110.00916.58
7.3.240.0160.00616.49
7.3.230.0060.01316.42
7.3.210.0130.01016.39
7.3.200.0130.01019.39
7.3.190.0070.01316.68
7.3.180.0060.01316.64
7.3.170.0000.01516.56
7.3.160.0100.00716.41
7.3.120.0070.00314.81
7.2.330.0080.00916.71
7.2.320.0120.00416.73
7.2.310.0130.01016.74
7.2.300.0140.00816.73
7.2.290.0130.00316.74
7.2.00.0190.00819.73
7.1.100.0060.00618.26
7.1.70.0040.00417.34
7.1.60.0130.01019.32
7.1.50.0000.02217.19
7.1.00.0070.07322.36
7.0.200.0070.00416.90
7.0.140.0000.07722.11
7.0.80.0530.08719.97
7.0.70.0530.08019.80
7.0.60.0230.08319.98
7.0.50.0570.08020.24
7.0.40.0100.08019.96
7.0.30.0130.04720.08
7.0.20.0070.04720.15
7.0.10.0130.04720.04
7.0.00.0100.07719.99
5.6.280.0100.07021.09
5.6.230.0070.08020.56
5.6.220.0100.07320.57
5.6.210.0030.07320.58
5.6.200.0170.05320.93
5.6.190.0030.08721.10
5.6.180.0170.08021.13
5.6.170.0070.08321.00
5.6.160.0070.04321.11
5.6.150.0030.05021.09
5.6.140.0000.07321.01
5.6.130.0000.07321.02
5.6.120.0100.08021.05
5.6.110.0030.09021.02
5.6.100.0070.05721.07
5.6.90.0230.07020.98
5.6.80.0030.08020.33
5.6.70.0070.08020.45
5.6.60.0130.04720.29
5.6.50.0000.07720.34
5.6.40.0130.03720.43
5.6.30.0170.06020.38
5.6.20.0170.08020.35
5.6.10.0070.07020.48
5.6.00.0130.03720.45
5.5.370.0030.06720.44
5.5.360.0030.08720.34
5.5.350.0130.05320.42
5.5.340.0230.06720.83
5.5.330.0070.08020.91
5.5.320.0130.07720.89
5.5.310.0000.04720.77
5.5.300.0030.06720.77
5.5.290.0030.05020.91
5.5.280.0070.09020.63
5.5.270.0070.05020.85
5.5.260.0130.07720.77
5.5.250.0200.06720.66
5.5.240.0100.06020.29
5.5.230.0100.04720.24
5.5.220.0100.04320.25
5.5.210.0100.07720.01
5.5.200.0070.07720.23
5.5.190.0030.05720.07
5.5.180.0100.03720.22
5.5.160.0030.06720.17
5.5.150.0100.07020.10
5.5.140.0070.08020.07
5.5.130.0170.04320.24
5.5.120.0070.07320.06
5.5.110.0170.03720.25
5.5.100.0100.07720.15
5.5.90.0070.05720.05
5.5.80.0130.06720.05
5.5.70.0130.04720.05
5.5.60.0030.08320.08
5.5.50.0100.05020.05
5.5.40.0070.07720.04
5.5.30.0000.05020.08
5.5.20.0100.08020.04
5.5.10.0070.06020.05
5.5.00.0100.04320.11
5.4.450.0100.04319.31
5.4.440.0070.08019.29
5.4.430.0070.07019.46
5.4.420.0070.08319.32
5.4.410.0170.07319.16
5.4.400.0100.07018.80
5.4.390.0070.07318.96
5.4.380.0030.07019.14
5.4.370.0030.08019.03
5.4.360.0170.06318.98
5.4.350.0130.07019.02
5.4.340.0100.03718.95
5.4.320.0000.08319.05
5.4.310.0100.04018.98
5.4.300.0130.07019.09
5.4.290.0030.07318.96
5.4.280.0100.07318.95
5.4.270.0170.03319.07
5.4.260.0130.06018.96
5.4.250.0100.05019.09
5.4.240.0030.04718.94
5.4.230.0070.07019.12
5.4.220.0170.06719.12
5.4.210.0100.07019.12
5.4.200.0130.06719.12
5.4.190.0030.05318.80
5.4.180.0030.08719.05
5.4.170.0100.04019.13
5.4.160.0000.05019.07
5.4.150.0100.07018.92
5.4.140.0000.06316.35
5.4.130.0100.07016.05
5.4.120.0230.05016.26
5.4.110.0000.07016.40
5.4.100.0030.06016.38
5.4.90.0100.07016.41
5.4.80.0100.07016.21
5.4.70.0070.07316.19
5.4.60.0070.07016.38
5.4.50.0100.06716.28
5.4.40.0070.04316.38
5.4.30.0130.03316.42
5.4.20.0030.07716.19
5.4.10.0030.04716.20
5.4.00.0100.07015.64
5.3.290.0130.07314.64
5.3.280.0100.07314.42
5.3.270.0070.07314.59
5.3.260.0000.07714.57
5.3.250.0000.07714.56
5.3.240.0100.07314.46
5.3.230.0100.07014.46
5.3.220.0170.05714.50
5.3.210.0030.06714.54
5.3.200.0000.05314.42
5.3.190.0100.06314.54
5.3.180.0070.06714.39
5.3.170.0000.05714.56
5.3.160.0030.04014.55
5.3.150.0030.07014.55
5.3.140.0070.07014.52
5.3.130.0070.07714.55
5.3.120.0070.04714.51
5.3.110.0170.07014.40
5.3.100.0000.04313.94
5.3.90.0070.07314.02
5.3.80.0070.07013.97
5.3.70.0070.07013.96
5.3.60.0100.06014.00
5.3.50.0130.03313.84
5.3.40.0130.03313.79
5.3.30.0000.03713.76
5.3.20.0030.03713.54
5.3.10.0070.03013.54
5.3.00.0130.03013.54
5.2.170.0000.06013.54
5.2.160.0030.05013.54
5.2.150.0000.03313.54
5.2.140.0000.03313.54
5.2.130.0070.03013.54
5.2.120.0030.05013.54
5.2.110.0030.02713.54
5.2.100.0000.03313.54
5.2.90.0000.03013.54
5.2.80.0030.03313.54
5.2.70.0000.03013.54
5.2.60.0030.02713.54
5.2.50.0030.05313.54
5.2.40.0000.03313.54
5.2.30.0000.03013.54
5.2.20.0030.03713.54
5.2.10.0100.04313.54
5.2.00.0000.02713.54
5.1.60.0070.03713.54
5.1.50.0000.05013.54
5.1.40.0000.02713.54
5.1.30.0070.03313.54
5.1.20.0070.02013.54
5.1.10.0000.02313.54
5.1.00.0030.02313.54
5.0.50.0000.03313.54
5.0.40.0000.02713.54
5.0.30.0000.03013.54
5.0.20.0000.02013.54
5.0.10.0000.02013.54
5.0.00.0000.03713.54
4.4.90.0000.01713.54
4.4.80.0000.01713.54
4.4.70.0000.02713.54
4.4.60.0000.01713.54
4.4.50.0000.02013.54
4.4.40.0000.03313.54
4.4.30.0000.02013.54
4.4.20.0000.01713.54
4.4.10.0000.03313.54
4.4.00.0000.05313.54
4.3.110.0070.02713.54
4.3.100.0070.01013.54
4.3.90.0000.01313.54
4.3.80.0000.02313.54
4.3.70.0000.01313.54
4.3.60.0000.01313.54
4.3.50.0000.02713.54
4.3.40.0000.02013.54
4.3.30.0030.01013.54
4.3.20.0000.01713.54
4.3.10.0030.01313.54
4.3.00.0070.01013.54

preferences:
48.22 ms | 400 KiB | 5 Q