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}\x[00c2}]~u', '', $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.0070.01016.63
8.3.50.0070.00816.59
8.3.40.0040.01218.95
8.3.30.0090.00618.92
8.3.20.0040.00418.76
8.3.10.0090.00018.89
8.3.00.0080.00019.38
8.2.180.0140.00716.32
8.2.170.0170.00322.96
8.2.160.0070.00718.88
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00720.94
8.2.110.0030.00622.34
8.2.100.0110.00018.03
8.2.90.0060.00317.88
8.2.80.0070.00318.78
8.2.70.0040.00417.88
8.2.60.0030.00617.63
8.2.50.0000.00817.80
8.2.40.0080.00019.73
8.2.30.0060.00317.97
8.2.20.0020.00717.77
8.2.10.0040.00417.89
8.2.00.0070.00017.94
8.1.280.0070.01125.92
8.1.270.0050.00323.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00022.14
8.1.230.0040.00822.07
8.1.220.0040.00418.77
8.1.210.0030.00518.77
8.1.200.0040.00417.35
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0050.00317.62
8.1.160.0050.00319.11
8.1.150.0070.00018.60
8.1.140.0040.00417.42
8.1.130.0040.00417.89
8.1.120.0080.00017.61
8.1.110.0000.00717.54
8.1.100.0030.00417.56
8.1.90.0070.00017.54
8.1.80.0020.00517.57
8.1.70.0030.00317.52
8.1.60.0050.00317.68
8.1.50.0040.00417.44
8.1.40.0040.00417.49
8.1.30.0050.00317.73
8.1.20.0000.00817.68
8.1.10.0050.00217.58
8.1.00.0000.00817.49
8.0.300.0030.00518.92
8.0.290.0040.00416.88
8.0.280.0000.00818.55
8.0.270.0030.00317.32
8.0.260.0030.00317.04
8.0.250.0040.00417.21
8.0.240.0040.00717.05
8.0.230.0040.00417.12
8.0.220.0000.00717.04
8.0.210.0000.00716.95
8.0.200.0030.00317.00
8.0.190.0000.00716.99
8.0.180.0000.00717.11
8.0.170.0030.00616.91
8.0.160.0000.00717.07
8.0.150.0050.00316.95
8.0.140.0000.00817.01
8.0.130.0000.00513.49
8.0.120.0030.00617.01
8.0.110.0040.00416.89
8.0.100.0040.00416.91
8.0.90.0000.00817.16
8.0.80.0080.00717.09
8.0.70.0040.00417.00
8.0.60.0000.00716.86
8.0.50.0030.00516.94
8.0.30.0080.01217.05
8.0.20.0140.00517.34
8.0.10.0040.00417.17
8.0.00.0120.01016.92
7.4.330.0020.00213.08
7.4.320.0060.00016.74
7.4.300.0030.00316.73
7.4.290.0000.00716.68
7.4.280.0000.00716.57
7.4.270.0000.00716.76
7.4.260.0000.00513.43
7.4.250.0030.00616.64
7.4.240.0040.00416.76
7.4.230.0000.00716.73
7.4.220.0120.01316.72
7.4.210.0110.01116.79
7.4.200.0050.00316.79
7.4.190.0050.00316.71
7.4.160.0060.00916.73
7.4.150.0090.00916.80
7.4.140.0030.01316.85
7.4.130.0170.00716.59
7.4.120.0140.00316.57
7.4.110.0060.01516.64
7.4.100.0110.00616.61
7.4.90.0030.01516.69
7.4.80.0160.00319.39
7.4.70.0100.00716.73
7.4.60.0100.00716.58
7.4.50.0040.00816.54
7.4.40.0070.01016.56
7.4.30.0130.00316.57
7.4.00.0090.00615.34
7.3.330.0030.00313.39
7.3.320.0030.00313.36
7.3.310.0000.00716.27
7.3.300.0030.00316.31
7.3.290.0110.00716.41
7.3.280.0110.01016.42
7.3.270.0150.00416.36
7.3.260.0100.00716.50
7.3.250.0100.00816.54
7.3.240.0120.00616.36
7.3.230.0080.00816.74
7.3.210.0160.00716.34
7.3.200.0000.01616.54
7.3.190.0210.00016.53
7.3.180.0060.01316.23
7.3.170.0100.00716.30
7.3.160.0130.00316.60
7.3.120.0040.00715.27
7.2.330.0120.00616.66
7.2.320.0090.01216.86
7.2.310.0150.00916.70
7.2.300.0070.01016.70
7.2.290.0100.00716.84
7.2.00.0030.00919.40
7.1.70.0000.00817.39
7.1.60.0150.00919.30
7.1.50.0040.01817.01
7.1.00.0130.06722.36
7.0.200.0120.00016.57
7.0.140.0100.06722.04
7.0.120.0030.05722.08
7.0.60.0030.07719.85
7.0.50.0100.03717.86
7.0.40.0070.08020.25
7.0.30.0200.04020.14
7.0.20.0270.08720.19
7.0.10.0000.06320.05
7.0.00.0000.06720.13
5.6.280.0070.07021.07
5.6.210.0000.05020.74
5.6.200.0070.07718.16
5.6.190.0030.07320.48
5.6.180.0570.07020.41
5.6.170.0230.08320.53
5.6.160.0300.05720.44
5.6.150.0030.06718.21
5.6.140.0030.05018.14
5.6.130.0030.05018.20
5.6.120.0100.04320.94
5.6.110.0000.04721.14
5.6.100.0030.04321.01
5.6.90.0170.07720.96
5.6.80.0070.08320.38
5.5.350.0270.06320.31
5.5.340.0030.04318.02
5.5.330.0130.07720.12
5.5.320.0470.06720.18
5.5.310.0200.03320.27
5.5.300.0000.04317.92
5.5.290.0070.08317.96
5.5.280.0130.03720.88
5.5.270.0000.05720.88
5.5.260.0130.07320.85
5.5.250.0070.05720.79
5.5.240.0000.08020.33
5.4.450.0000.05319.26
5.4.440.0030.08319.20
5.4.430.0000.06719.35
5.4.420.0100.07319.57
5.4.410.0070.07719.45
5.4.400.0070.06318.81
5.4.390.0070.07719.13
5.4.380.0030.05018.88
5.4.370.0030.07719.13
5.4.360.0070.06719.09
5.4.350.0030.08018.79
5.4.340.0100.05319.26
5.4.320.0030.06719.21
5.4.310.0070.04318.81
5.4.300.0030.06019.24
5.4.290.0000.06319.27
5.4.280.0000.04319.13
5.4.270.0000.06718.92
5.4.260.0030.06018.80
5.4.250.0030.07718.80
5.4.240.0030.07719.24
5.4.230.0030.07319.05
5.4.220.0030.06319.12
5.4.210.0070.07319.13
5.4.200.0030.04319.21
5.4.190.0070.05319.06
5.4.180.0070.07719.23
5.4.170.0030.06319.05
5.4.160.0030.08018.89
5.4.150.0100.07018.78
5.4.140.0030.05716.19
5.4.130.0070.06016.26
5.4.120.0130.06016.25
5.4.110.0030.07716.34
5.4.100.0100.06716.20
5.4.90.0030.04716.06
5.4.80.0000.08016.21
5.4.70.0000.05316.39
5.4.60.0030.07016.38
5.4.50.0100.07016.24
5.4.40.0130.05316.40
5.4.30.0000.05016.31
5.4.20.0000.05716.36
5.4.10.0000.06716.45
5.4.00.0030.03315.80
5.3.290.0030.07714.68
5.3.280.0030.06014.44
5.3.270.0030.07714.63
5.3.260.0030.07714.46
5.3.250.0100.05714.55
5.3.240.0000.07714.47
5.3.230.0070.06714.57
5.3.220.0030.07314.46
5.3.210.0070.08314.51
5.3.200.0000.08014.65
5.3.190.0000.07714.46
5.3.180.0000.08314.41
5.3.170.0130.05014.50
5.3.160.0000.08314.50
5.3.150.0030.05314.42
5.3.140.0000.08014.58
5.3.130.0030.06014.38
5.3.120.0000.05314.65
5.3.110.0030.03714.57
5.3.100.0000.04014.12
5.3.90.0030.05313.89
5.3.80.0030.07013.86
5.3.70.0000.05713.86
5.3.60.0070.06713.95
5.3.50.0030.05013.82
5.3.40.0070.05013.99
5.3.30.0030.06713.86
5.3.20.0000.07713.66
5.3.10.0030.07313.75
5.3.00.0070.04713.43
5.2.170.0000.06312.70
5.2.160.0030.04712.70
5.2.150.0000.06712.70
5.2.140.0100.05712.70
5.2.130.0030.05012.70
5.2.120.0000.06012.70
5.2.110.0030.03012.70
5.2.100.0130.04012.70
5.2.90.0000.06012.70
5.2.80.0070.05712.70
5.2.70.0070.06012.70
5.2.60.0000.06312.70
5.2.50.0030.06312.70
5.2.40.0070.05712.70
5.2.30.0070.06012.70
5.2.20.0070.05712.70
5.2.10.0030.06012.70
5.2.00.0070.05712.70
5.1.60.0030.04712.70
5.1.50.0030.04012.70
5.1.40.0070.05312.70
5.1.30.0000.04712.70
5.1.20.0000.04012.70
5.1.10.0030.04312.70
5.1.00.0070.03712.70
5.0.50.0030.04712.70
5.0.40.0000.04012.70
5.0.30.0070.05312.70
5.0.20.0030.03712.70
5.0.10.0100.03012.70
5.0.00.0000.03012.70
4.4.90.0000.02312.70
4.4.80.0070.02312.70
4.4.70.0000.03012.70
4.4.60.0000.03312.70
4.4.50.0030.03012.70
4.4.40.0000.04712.70
4.4.30.0000.04012.70
4.4.20.0030.01712.70
4.4.10.0000.03312.70
4.4.00.0000.04012.70
4.3.110.0030.03312.70
4.3.100.0030.03012.70
4.3.90.0000.02312.70
4.3.80.0030.02712.70
4.3.70.0000.01712.70
4.3.60.0000.01312.70
4.3.50.0000.02712.70
4.3.40.0030.02012.70
4.3.30.0030.01312.70
4.3.20.0000.01712.70
4.3.10.0030.01312.70
4.3.00.0030.01312.70

preferences:
60.78 ms | 401 KiB | 5 Q