3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xc2"; $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.70.0110.00416.50
8.3.60.0100.01016.50
8.3.50.0110.00517.42
8.3.40.0150.00618.74
8.3.30.0040.01118.89
8.3.20.0120.00618.61
8.3.10.0120.00620.73
8.3.00.0170.00319.38
8.2.180.0080.00616.63
8.2.170.0110.00422.96
8.2.160.0110.00420.38
8.2.150.0000.00724.18
8.2.140.0070.00024.66
8.2.130.0000.01026.16
8.2.120.0080.00019.48
8.2.110.0030.00721.00
8.2.100.0060.00617.97
8.2.90.0030.00619.28
8.2.80.0040.00417.92
8.2.70.0090.00017.75
8.2.60.0000.00817.91
8.2.50.0040.00418.07
8.2.40.0000.00918.28
8.2.30.0000.00718.00
8.2.20.0060.00617.79
8.2.10.0040.00417.93
8.2.00.0050.00217.77
8.1.280.0160.00025.92
8.1.270.0080.00024.66
8.1.260.0060.01026.35
8.1.250.0060.00328.09
8.1.240.0040.00420.79
8.1.230.0030.00920.97
8.1.220.0030.00617.75
8.1.210.0000.00820.61
8.1.200.0030.00617.13
8.1.190.0050.00317.51
8.1.180.0030.00518.10
8.1.170.0090.00018.74
8.1.160.0000.00818.91
8.1.150.0030.00518.68
8.1.140.0030.00517.44
8.1.130.0000.00717.88
8.1.120.0000.00917.52
8.1.110.0000.00817.56
8.1.100.0040.00417.54
8.1.90.0000.00717.49
8.1.80.0000.00717.50
8.1.70.0070.00017.51
8.1.60.0040.00417.63
8.1.50.0040.00417.47
8.1.40.0040.00417.47
8.1.30.0030.00517.73
8.1.20.0000.00817.75
8.1.10.0000.00817.56
8.1.00.0070.00017.48
8.0.300.0050.00220.02
8.0.290.0070.00016.75
8.0.280.0000.00718.34
8.0.270.0000.00717.27
8.0.260.0030.00616.89
8.0.250.0040.00417.04
8.0.240.0040.00417.09
8.0.230.0000.00717.04
8.0.220.0000.00716.93
8.0.210.0030.00316.95
8.0.200.0030.00317.01
8.0.190.0000.00716.97
8.0.180.0050.00316.98
8.0.170.0040.00417.04
8.0.160.0040.00416.96
8.0.150.0030.00616.81
8.0.140.0040.00416.88
8.0.130.0030.00313.45
8.0.120.0070.00016.84
8.0.110.0030.00516.92
8.0.100.0000.00717.00
8.0.90.0050.00316.91
8.0.80.0030.01316.95
8.0.70.0000.00716.99
8.0.60.0040.00417.04
8.0.50.0050.00216.85
8.0.30.0080.01117.21
8.0.20.0130.00416.93
8.0.10.0000.00817.11
8.0.00.0080.01216.85
7.4.330.0000.00413.14
7.4.320.0040.00416.66
7.4.300.0000.00616.66
7.4.290.0070.00016.70
7.4.280.0080.00016.77
7.4.270.0070.00016.63
7.4.260.0020.00513.45
7.4.250.0030.00516.66
7.4.240.0040.00416.79
7.4.230.0030.00316.70
7.4.220.0090.00916.72
7.4.210.0050.00916.63
7.4.200.0030.00316.68
7.4.190.0070.00016.46
7.4.160.0080.00816.63
7.4.150.0090.00916.71
7.4.140.0060.01416.58
7.4.130.0110.00916.67
7.4.120.0100.00716.63
7.4.110.0060.01216.68
7.4.100.0140.00316.80
7.4.90.0100.01016.57
7.4.80.0130.00416.64
7.4.70.0090.00916.63
7.4.60.0160.00816.68
7.4.50.0030.00616.38
7.4.40.0050.00716.57
7.4.30.0070.01016.67
7.4.00.0030.01315.18
7.3.330.0030.00313.27
7.3.320.0030.00313.02
7.3.310.0000.00716.18
7.3.300.0000.00716.36
7.3.290.0070.00716.36
7.3.280.0100.00516.33
7.3.270.0100.00716.68
7.3.260.0080.01216.66
7.3.250.0100.01416.38
7.3.240.0120.00316.35
7.3.230.0110.00716.29
7.3.210.0110.00716.36
7.3.200.0190.00319.39
7.3.190.0060.01616.63
7.3.180.0150.00016.70
7.3.170.0150.00016.32
7.3.160.0090.00616.29
7.3.120.0090.00614.60
7.3.10.0030.01016.67
7.3.00.0040.00816.60
7.2.330.0090.00916.54
7.2.320.0140.00316.80
7.2.310.0100.01016.70
7.2.300.0070.01116.70
7.2.290.0030.01416.85
7.2.130.0080.00417.02
7.2.120.0040.00917.05
7.2.110.0060.00917.12
7.2.100.0060.00817.02
7.2.90.0050.00817.05
7.2.80.0070.00717.08
7.2.70.0010.01216.91
7.2.60.0010.01116.92
7.2.50.0040.01017.05
7.2.40.0030.00716.93
7.2.30.0040.00817.06
7.2.20.0080.00616.88
7.2.10.0040.01017.07
7.2.00.0030.00817.61
7.1.250.0050.00615.97
7.1.70.0040.00417.40
7.1.60.0170.00719.40
7.1.50.0040.00717.16
7.1.00.0030.07322.32
7.0.200.0030.01416.89
7.0.140.0030.07022.06
7.0.120.0030.06722.01
7.0.60.0000.04320.02
7.0.50.0100.03717.89
7.0.40.0030.04320.07
7.0.30.0330.07020.15
7.0.20.0200.08020.19
7.0.10.0270.07320.35
7.0.00.0030.05720.05
5.6.280.0100.07020.89
5.6.210.0070.08020.61
5.6.200.0100.08018.12
5.6.190.0070.05720.76
5.6.180.0400.07320.27
5.6.170.0200.05720.71
5.6.160.0030.04720.46
5.6.150.0130.07318.16
5.6.140.0100.05718.22
5.6.130.0030.04318.12
5.6.120.0070.05321.14
5.6.110.0100.06721.12
5.6.100.0070.05721.12
5.6.90.0230.07020.99
5.6.80.0130.06020.39
5.6.70.3830.03320.51
5.5.350.0370.06720.39
5.5.340.0030.08317.97
5.5.330.0200.07320.25
5.5.320.0270.05020.16
5.5.310.0230.06020.15
5.5.300.0100.06018.00
5.5.290.0070.08317.95
5.5.280.0100.04720.97
5.5.270.0070.04020.64
5.5.260.0170.07020.88
5.5.250.0130.08020.46
5.5.240.0100.05320.34
5.4.450.0070.05019.12
5.4.440.0000.08719.13
5.4.430.0100.07719.24
5.4.420.0030.08719.46
5.4.410.0030.06019.38
5.4.400.0000.08718.93
5.4.390.0070.08018.92
5.4.380.0070.07719.17
5.4.370.0130.07019.14
5.4.360.0170.06719.08
5.4.350.0130.07319.15
5.4.340.0070.05319.08
5.4.320.0100.06019.18
5.4.310.0000.08018.78
5.4.300.0000.04018.79
5.4.290.0070.03719.16
5.4.280.0000.04319.21
5.4.270.0000.07018.78
5.4.260.0070.05719.17
5.4.250.0070.05319.14
5.4.240.0100.07018.78
5.4.230.0030.05019.18
5.4.220.0030.06718.78
5.4.210.0100.07318.78
5.4.200.0100.07719.17
5.4.190.0070.07719.10
5.4.180.0000.04318.79
5.4.170.0170.06718.77
5.4.160.0030.08019.15
5.4.150.0070.08019.10
5.4.140.0030.06716.25
5.4.130.0100.07316.24
5.4.120.0030.03716.24
5.4.110.0170.06316.30
5.4.100.0030.05016.14
5.4.90.0100.04316.23
5.4.80.0170.06016.30
5.4.70.0030.07716.39
5.4.60.0070.06716.36
5.4.50.0030.08316.25
5.4.40.0070.07716.25
5.4.30.0100.05716.21
5.4.20.0030.06316.12
5.4.10.0070.07716.36
5.4.00.0030.07015.70
5.3.290.0100.06014.60
5.3.280.0130.05714.56
5.3.270.0130.07014.55
5.3.260.0030.05714.42
5.3.250.0000.04714.49
5.3.240.0030.07314.54
5.3.230.0070.05014.52
5.3.220.0200.06014.49
5.3.210.0070.07714.50
5.3.200.0030.08014.38
5.3.190.0030.08014.49
5.3.180.0070.06014.52
5.3.170.0130.06014.48
5.3.160.0200.06314.50
5.3.150.0070.06314.44
5.3.140.0070.07014.47
5.3.130.0030.05314.48
5.3.120.0100.07014.47
5.3.110.0130.06014.36
5.3.100.0030.04313.96
5.3.90.0030.08013.97
5.3.80.0130.06713.96
5.3.70.0070.05314.00
5.3.60.0030.04314.09
5.3.50.0030.04013.89
5.3.40.0130.05313.86
5.3.30.0200.06313.70
5.3.20.0030.07313.64
5.3.10.0070.07313.54
5.3.00.0170.05713.65
5.2.170.0030.03711.08
5.2.160.0070.02711.13
5.2.150.0030.06311.07
5.2.140.0030.05711.21
5.2.130.0030.03711.25
5.2.120.0070.06011.07
5.2.110.0030.03311.10
5.2.100.0070.02711.03
5.2.90.0070.03011.11
5.2.80.0000.03311.03
5.2.70.0030.07011.26
5.2.60.0070.06710.98
5.2.50.0030.06710.94
5.2.40.0000.04311.00
5.2.30.0130.05310.96
5.2.20.0030.03710.86
5.2.10.0100.04010.85
5.2.00.0100.06310.59
5.1.60.0070.05010.05
5.1.50.0030.0539.99
5.1.40.0070.0279.87
5.1.30.0100.04310.37
5.1.20.0070.04010.35
5.1.10.0030.0339.98
5.1.00.0070.03010.12
5.0.50.0030.0438.89
5.0.40.0000.0378.89
5.0.30.0000.0508.89
5.0.20.0000.0338.89
5.0.10.0000.0238.89
5.0.00.0070.0278.89
4.4.90.0070.0178.89
4.4.80.0030.0338.89
4.4.70.0000.0378.89
4.4.60.0030.0378.89
4.4.50.0030.0238.89
4.4.40.0030.0378.89
4.4.30.0000.0308.89
4.4.20.0030.0208.89
4.4.10.0000.0278.89
4.4.00.0030.0578.89
4.3.110.0000.0278.89
4.3.100.0030.0178.89
4.3.90.0030.0178.89
4.3.80.0000.0278.89
4.3.70.0000.0208.89
4.3.60.0000.0278.89
4.3.50.0000.0338.89
4.3.40.0100.0178.89
4.3.30.0030.0338.89
4.3.20.0000.0308.89
4.3.10.0030.0378.89
4.3.00.0000.0208.89

preferences:
39.47 ms | 401 KiB | 5 Q