3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xc2"; //$result = trim($result,"\xc2"/*"\xa0"*/); //echo preg_replace('#[\x00-\x1F\x7F-\x9F]#S', '', $result); $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('//[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]'. //'|[\x00-\x7F][\x80-\xBF]+'. //'|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*'. '/[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})'. '|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})/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.0140.00718.53
8.3.50.0110.00922.09
8.3.40.0070.00718.89
8.3.30.0150.00318.86
8.3.20.0030.00620.08
8.3.10.0040.00422.04
8.3.00.0040.00422.33
8.2.180.0040.01516.88
8.2.170.0060.00922.96
8.2.160.0070.00719.04
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00019.48
8.2.110.0110.00020.47
8.2.100.0120.00019.63
8.2.90.0040.00419.17
8.2.80.0040.00418.04
8.2.70.0060.00317.75
8.2.60.0000.00817.92
8.2.50.0000.00818.07
8.2.40.0040.00419.94
8.2.30.0000.00818.12
8.2.20.0000.00717.89
8.2.10.0050.00217.96
8.2.00.0040.00417.89
8.1.280.0100.00725.92
8.1.270.0000.00922.05
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.80
8.1.230.0100.00019.21
8.1.220.0080.00017.79
8.1.210.0030.00618.77
8.1.200.0060.00317.21
8.1.190.0030.00617.28
8.1.180.0060.00318.69
8.1.170.0030.00518.71
8.1.160.0040.00421.94
8.1.150.0040.00418.77
8.1.140.0040.00417.60
8.1.130.0030.00317.72
8.1.120.0040.00417.43
8.1.110.0060.00317.54
8.1.100.0000.00717.53
8.1.90.0070.00017.49
8.1.80.0000.00817.45
8.1.70.0070.00017.44
8.1.60.0030.00617.63
8.1.50.0000.00717.51
8.1.40.0040.00417.50
8.1.30.0040.00417.61
8.1.20.0050.00317.57
8.1.10.0040.00417.60
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0070.00017.18
8.0.280.0030.00318.34
8.0.270.0040.00417.24
8.0.260.0030.00316.99
8.0.250.0030.00317.08
8.0.240.0050.00217.18
8.0.230.0030.00317.04
8.0.220.0000.00717.05
8.0.210.0050.00216.97
8.0.200.0030.00317.09
8.0.190.0000.00717.15
8.0.180.0080.00017.10
8.0.170.0000.00716.94
8.0.160.0000.00717.05
8.0.150.0030.00316.89
8.0.140.0000.00716.87
8.0.130.0030.00313.55
8.0.120.0030.00517.01
8.0.110.0000.00717.06
8.0.100.0040.00417.11
8.0.90.0040.00416.87
8.0.80.0070.01017.03
8.0.70.0070.00017.02
8.0.60.0050.00317.11
8.0.50.0000.00716.99
8.0.30.0110.00817.14
8.0.20.0110.00817.40
8.0.10.0000.00816.96
8.0.00.0130.00816.95
7.4.330.0030.00315.16
7.4.320.0000.00616.76
7.4.300.0030.00316.68
7.4.290.0070.00016.77
7.4.280.0030.00316.75
7.4.270.0030.00516.64
7.4.260.0060.00316.66
7.4.250.0040.00416.68
7.4.240.0020.00616.70
7.4.230.0000.00816.78
7.4.220.0130.01016.85
7.4.210.0070.00816.69
7.4.200.0070.00016.49
7.4.190.0000.00716.66
7.4.160.0080.00816.63
7.4.150.0090.00817.40
7.4.140.0090.01117.86
7.4.130.0170.00916.78
7.4.120.0090.00816.66
7.4.110.0080.00816.85
7.4.100.0130.00716.56
7.4.90.0120.01016.59
7.4.80.0040.01519.39
7.4.70.0080.00916.50
7.4.60.0120.00616.69
7.4.50.0040.00416.41
7.4.40.0040.01122.77
7.4.30.0070.01516.79
7.4.10.0120.00615.16
7.4.00.0080.00815.06
7.3.330.0050.00013.20
7.3.320.0060.00013.25
7.3.310.0030.00316.41
7.3.300.0000.00616.43
7.3.290.0100.00316.47
7.3.280.0080.00916.47
7.3.270.0160.00317.40
7.3.260.0040.01216.39
7.3.250.0120.00516.52
7.3.240.0090.00616.50
7.3.230.0100.00616.76
7.3.210.0090.00916.52
7.3.200.0040.01319.39
7.3.190.0040.01216.86
7.3.180.0210.00016.44
7.3.170.0140.00316.70
7.3.160.0060.00916.52
7.3.130.0060.00915.08
7.3.120.0070.00914.80
7.3.110.0020.01414.98
7.3.100.0060.00915.07
7.3.90.0100.00414.89
7.3.80.0060.00714.79
7.3.70.0040.01014.84
7.3.60.0080.00514.83
7.3.50.0050.00915.00
7.3.40.0100.00614.99
7.3.30.0110.00414.76
7.3.20.0100.00415.70
7.3.10.0090.00515.76
7.3.00.0100.00515.89
7.2.330.0110.00616.61
7.2.320.0090.00816.73
7.2.310.0090.00916.75
7.2.300.0070.01116.84
7.2.290.0120.00316.82
7.2.260.0060.01015.11
7.2.250.0070.00915.17
7.2.240.0060.00915.04
7.2.230.0090.00615.04
7.2.220.0100.00815.11
7.2.210.0060.00715.17
7.2.200.0050.00715.03
7.2.190.0110.00515.23
7.2.180.0060.00715.02
7.2.170.0100.00814.90
7.2.160.0080.00915.03
7.2.150.0070.00716.14
7.2.140.0080.00816.13
7.2.130.0070.00615.94
7.2.120.0070.00716.13
7.2.110.0090.00816.13
7.2.100.0090.00616.13
7.2.90.0050.00715.99
7.2.80.0010.01316.16
7.2.70.0050.01015.98
7.2.60.0080.00715.95
7.2.50.0080.00615.92
7.2.40.0080.01116.01
7.2.30.0070.00716.08
7.2.20.0060.01115.93
7.2.10.0070.00816.07
7.2.00.0090.00616.03
7.1.330.0060.01114.81
7.1.320.0060.01314.93
7.1.310.0070.01014.87
7.1.300.0200.01014.93
7.1.290.0080.00815.01
7.1.280.0120.00614.94
7.1.270.0100.00615.12
7.1.260.0110.00615.13
7.1.250.0080.00914.84
7.1.240.0220.00515.00
7.1.230.0080.00814.94
7.1.220.0100.00615.02
7.1.210.0110.00515.04
7.1.200.0110.00614.99
7.1.190.0120.00614.96
7.1.180.0110.00415.04
7.1.170.0070.01115.14
7.1.160.0090.01014.83
7.1.150.0070.00815.02
7.1.140.0080.01014.84
7.1.130.0110.00514.89
7.1.120.0090.00615.00
7.1.110.0080.00814.92
7.1.100.0090.00516.23
7.1.90.0100.00714.82
7.1.80.0110.00814.97
7.1.70.0040.01115.72
7.1.60.0040.01116.53
7.1.50.0080.00815.77
7.1.40.0070.00714.90
7.1.30.0090.00414.97
7.1.20.0080.00514.85
7.1.10.0080.00515.05
7.1.00.0060.02917.44
7.0.330.0060.01114.75
7.0.320.0070.00814.78
7.0.310.0050.01214.40
7.0.300.0130.01014.62
7.0.290.0080.00614.50
7.0.280.0080.00814.60
7.0.270.0070.01214.51
7.0.260.0090.00814.53
7.0.250.0100.00514.72
7.0.240.0160.00914.55
7.0.230.0110.00814.68
7.0.220.0100.00514.64
7.0.210.0100.01014.52
7.0.200.0030.00815.42
7.0.190.0060.00714.62
7.0.180.0030.01214.61
7.0.170.0080.00614.73
7.0.160.0020.01414.81
7.0.150.0080.00714.72
7.0.140.0020.03117.08
7.0.130.0080.00514.67
7.0.120.0090.00314.65
7.0.110.0070.01014.45
7.0.100.0070.02116.47
7.0.90.0080.01816.42
7.0.80.0030.02016.47
7.0.70.0070.01916.35
7.0.60.0080.02016.45
7.0.50.0070.01816.52
7.0.40.0120.01315.89
7.0.30.0030.02315.82
7.0.20.0060.01815.72
7.0.10.0080.01715.89
7.0.00.0080.02015.81
5.6.400.0100.00714.48
5.6.390.0050.01314.36
5.6.380.0090.00914.40
5.6.370.0090.00814.36
5.6.360.0080.01014.26
5.6.350.0100.00614.57
5.6.340.0040.01414.24
5.6.330.0110.00614.52
5.6.320.0110.00814.46
5.6.310.0070.01014.50
5.6.300.0030.00814.44
5.6.290.0080.00514.44
5.6.280.0070.02716.54
5.6.270.0090.00714.35
5.6.260.0090.00614.41
5.6.250.0080.01416.40
5.6.240.0070.02116.49
5.6.230.0030.02316.26
5.6.220.0060.02116.48
5.6.210.0090.01516.36
5.6.200.0050.02016.58
5.6.190.0060.01816.52
5.6.180.0080.01916.55
5.6.170.0110.02016.55
5.6.160.0070.01516.48
5.6.150.0130.01316.43
5.6.140.0140.01116.48
5.6.130.0110.01616.66
5.6.120.0070.01916.47
5.6.110.0060.01616.49
5.6.100.0010.02516.56
5.6.90.0030.02116.55
5.6.80.0090.02816.32
5.6.70.0080.02616.37
5.6.60.0100.02116.22
5.6.50.0090.02816.20
5.6.40.0100.02216.25
5.6.30.0090.03216.19
5.6.20.0120.01516.21
5.6.10.0100.02616.32
5.6.00.0050.03316.34
5.5.380.0120.01616.28
5.5.370.0080.01816.38
5.5.360.0120.01716.27
5.5.350.0080.01716.42
5.5.340.0050.02116.52
5.5.330.0070.01516.41
5.5.320.0090.01816.46
5.5.310.0080.02216.44
5.5.300.0040.01816.29
5.5.290.0060.02016.40
5.5.280.0110.01616.58
5.5.270.0080.02516.29
5.5.260.0060.02216.47
5.5.250.0070.01816.20
5.5.240.0040.02916.29
5.5.230.0130.02616.36
5.5.220.0070.03016.24
5.5.210.0070.03416.16
5.5.200.0100.01616.13
5.5.190.0110.03015.93
5.5.180.0070.02716.19
5.5.170.0110.00714.16
5.5.160.0080.03216.13
5.5.150.0120.02116.06
5.5.140.0060.03516.11
5.5.130.0060.03216.28
5.5.120.0110.03016.15
5.5.110.0090.01616.23
5.5.100.0110.02716.04
5.5.90.0110.02816.03
5.5.80.0120.02916.19
5.5.70.0090.02616.18
5.5.60.0100.02816.12
5.5.50.0070.03316.05
5.5.40.0090.02916.07
5.5.30.0110.02716.06
5.5.20.0130.02716.11
5.5.10.0120.02715.94
5.5.00.0070.02316.06
5.4.450.0080.01314.23
5.4.440.0060.01714.35
5.4.430.0060.01614.27
5.4.420.0060.01914.36
5.4.410.0070.01614.29
5.4.400.0070.02414.13
5.4.390.0050.02114.19
5.4.380.0070.02914.31
5.4.370.0060.03114.12
5.4.360.0080.02714.23
5.4.350.0070.01714.25
5.4.340.0040.03214.18
5.4.330.0040.01011.86
5.4.320.0010.02214.23
5.4.310.0100.01714.18
5.4.300.0120.02714.12
5.4.290.0060.02614.19
5.4.280.0070.02814.25
5.4.270.0080.02614.19
5.4.260.0100.02114.27
5.4.250.0060.03014.37
5.4.240.0050.02614.28
5.4.230.0070.03114.21
5.4.220.0070.03214.24
5.4.210.0080.02514.31
5.4.200.0070.02914.04
5.4.190.0120.02014.30
5.4.180.0060.03114.23
5.4.170.0080.02614.16
5.4.160.0090.01814.22
5.4.150.0060.01814.12
5.4.140.0040.02813.39
5.4.130.0070.02713.22
5.4.120.0100.02713.35
5.4.110.0060.02113.30
5.4.100.0060.02613.33
5.4.90.0060.02513.29
5.4.80.0090.01913.32
5.4.70.0090.02713.28
5.4.60.0060.02613.32
5.4.50.0080.02613.30
5.4.40.0080.02613.37
5.4.30.0080.03013.28
5.4.20.0020.02513.29
5.4.10.0060.01713.28
5.4.00.0090.01713.03
5.3.290.0040.02112.68
5.3.280.0110.02712.49
5.3.270.0080.02612.58
5.3.260.0100.02512.55
5.3.250.0060.03012.52
5.3.240.0080.02512.48
5.3.230.0070.02412.54
5.3.220.0090.01712.54
5.3.210.0040.02412.56
5.3.200.0020.02112.48
5.3.190.0050.01712.61
5.3.180.0040.03112.60
5.3.170.0100.02412.50
5.3.160.0050.03012.57
5.3.150.0040.02912.60
5.3.140.0060.02812.52
5.3.130.0080.02712.55
5.3.120.0080.02912.62
5.3.110.0060.02612.57
5.3.100.0070.01812.45
5.3.90.0070.03012.42
5.3.80.0030.03112.29
5.3.70.0100.02512.33
5.3.60.0060.02512.37
5.3.50.0080.02112.24
5.3.40.0050.02012.27
5.3.30.0050.03012.26
5.3.20.0060.03212.23
5.3.10.0070.01812.20
5.3.00.0070.02512.13
5.2.170.0080.01511.89
5.2.160.0100.03011.83
5.2.150.0090.02311.88
5.2.140.0050.03511.94
5.2.130.0100.02611.82
5.2.120.0070.02711.81
5.2.110.0090.03011.80
5.2.100.0050.02911.82
5.2.90.0090.02711.94
5.2.80.0050.03511.91
5.2.70.0070.02011.91
5.2.60.0070.02211.87
5.2.50.0040.01911.88
5.2.40.0050.01811.84
5.2.30.0040.02111.75
5.2.20.0080.03011.79
5.2.10.0090.03011.80
5.2.00.0080.02411.70
5.1.60.0030.02611.70
5.1.50.0040.01811.70
5.1.40.0030.01811.70
5.1.30.0080.02811.70
5.1.20.0060.01911.70
5.1.10.0060.02611.70
5.1.00.0080.02211.70
5.0.50.0030.02611.70
5.0.40.0080.02111.70
5.0.30.0020.03211.70
5.0.20.0030.01111.70
5.0.10.0080.01511.70
5.0.00.0080.02811.70
4.4.90.0030.01611.70
4.4.80.0020.01311.70
4.4.70.0060.01611.70
4.4.60.0050.01711.70
4.4.50.0040.01811.70
4.4.40.0030.03011.70
4.4.30.0040.01311.70
4.4.20.0070.01711.70
4.4.10.0050.01511.70
4.4.00.0020.01811.70
4.3.110.0030.01711.70
4.3.100.0030.01311.70
4.3.90.0010.02011.70
4.3.80.0050.02711.70
4.3.70.0030.01811.70
4.3.60.0090.01011.70
4.3.50.0040.00911.70
4.3.40.0040.02811.70
4.3.30.0050.01111.70
4.3.20.0040.01711.70
4.3.10.0020.02011.70
4.3.00.0020.01811.70

preferences:
43.39 ms | 401 KiB | 5 Q