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.0160.00316.75
8.3.50.0140.00522.12
8.3.40.0060.00918.83
8.3.30.0080.00619.09
8.3.20.0040.00420.21
8.3.10.0040.00423.64
8.3.00.0060.00317.63
8.2.180.0110.00716.75
8.2.170.0140.00022.96
8.2.160.0170.00320.39
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00322.41
8.2.110.0070.00320.35
8.2.100.0080.00617.97
8.2.90.0050.00319.21
8.2.80.0080.00017.97
8.2.70.0040.00417.88
8.2.60.0040.00417.92
8.2.50.0040.00418.10
8.2.40.0060.00320.61
8.2.30.0000.00719.16
8.2.20.0040.00417.75
8.2.10.0080.00018.14
8.2.00.0060.00317.86
8.1.280.0070.00725.92
8.1.270.0110.00422.20
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00322.29
8.1.230.0090.00317.64
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0090.00017.23
8.1.180.0060.00318.10
8.1.170.0000.00818.71
8.1.160.0070.00018.81
8.1.150.0040.00420.11
8.1.140.0000.00817.46
8.1.130.0040.00417.73
8.1.120.0020.00517.58
8.1.110.0040.00417.46
8.1.100.0000.00717.46
8.1.90.0080.00017.44
8.1.80.0050.00217.54
8.1.70.0030.00517.46
8.1.60.0030.00617.71
8.1.50.0000.00917.51
8.1.40.0040.00417.62
8.1.30.0000.00917.57
8.1.20.0040.00417.63
8.1.10.0080.00017.63
8.1.00.0000.00817.49
8.0.300.0000.00818.77
8.0.290.0060.00316.88
8.0.280.0030.00518.52
8.0.270.0040.00417.20
8.0.260.0040.00417.30
8.0.250.0070.00016.98
8.0.240.0030.00517.11
8.0.230.0000.00817.09
8.0.220.0070.00016.86
8.0.210.0000.00716.92
8.0.200.0030.00316.94
8.0.190.0030.00517.03
8.0.180.0000.00717.01
8.0.170.0000.00816.95
8.0.160.0070.00016.95
8.0.150.0100.00016.92
8.0.140.0040.00416.95
8.0.130.0030.00713.38
8.0.120.0040.00416.94
8.0.110.0030.00617.04
8.0.100.0000.00816.89
8.0.90.0040.00416.94
8.0.80.0110.00317.05
8.0.70.0040.00416.98
8.0.60.0030.00616.86
8.0.50.0070.00016.77
8.0.30.0150.00717.11
8.0.20.0050.01617.40
8.0.10.0040.00417.05
8.0.00.0100.00816.91
7.4.330.0000.00515.00
7.4.320.0030.00316.77
7.4.300.0000.00616.74
7.4.290.0000.00716.67
7.4.280.0000.00716.78
7.4.270.0070.00016.67
7.4.260.0110.00016.55
7.4.250.0030.00316.75
7.4.240.0020.00616.74
7.4.230.0000.00716.84
7.4.220.0160.00316.70
7.4.210.0080.00816.72
7.4.200.0040.00416.84
7.4.190.0000.00716.84
7.4.160.0060.01016.84
7.4.150.0060.01217.40
7.4.140.0110.00717.86
7.4.130.0130.00516.63
7.4.120.0100.00716.67
7.4.110.0040.01516.56
7.4.100.0130.00616.65
7.4.90.0100.00716.57
7.4.80.0100.01319.39
7.4.70.0000.01816.69
7.4.60.0060.01016.52
7.4.50.0030.00316.61
7.4.40.0130.00022.77
7.4.30.0030.01316.60
7.4.10.0070.01114.96
7.4.00.0080.00814.94
7.3.330.0000.00513.11
7.3.320.0000.00513.19
7.3.310.0040.00416.44
7.3.300.0030.00316.35
7.3.290.0100.01216.38
7.3.280.0100.00716.37
7.3.270.0140.00317.40
7.3.260.0150.00316.43
7.3.250.0070.01116.48
7.3.240.0190.00016.59
7.3.230.0100.00616.53
7.3.210.0160.00016.77
7.3.200.0040.01419.39
7.3.190.0120.00616.41
7.3.180.0060.00916.43
7.3.170.0090.00616.75
7.3.160.0040.01216.79
7.3.130.0130.00615.10
7.3.120.0060.01114.80
7.3.110.0000.02015.05
7.3.100.0030.01014.79
7.3.90.0130.00014.95
7.3.80.0030.01014.62
7.3.70.0040.01114.63
7.3.60.0030.00614.98
7.3.50.0070.00715.09
7.3.40.0140.00014.96
7.3.30.0120.00314.71
7.3.20.0060.00616.70
7.3.10.0070.01016.63
7.3.00.0090.00716.69
7.2.330.0070.01316.66
7.2.320.0070.01416.64
7.2.310.0000.01716.63
7.2.300.0130.00616.86
7.2.290.0060.01616.75
7.2.260.0040.01115.04
7.2.250.0060.01214.93
7.2.240.0090.00615.18
7.2.230.0070.00715.01
7.2.220.0100.00615.13
7.2.210.0030.01315.23
7.2.200.0000.01915.10
7.2.190.0040.01215.15
7.2.180.0090.00315.06
7.2.170.0030.01314.99
7.2.160.0110.00015.27
7.2.150.0090.00316.98
7.2.140.0030.01417.12
7.2.130.0090.01216.77
7.2.120.0100.00716.85
7.2.110.0120.01216.80
7.2.100.0080.01116.82
7.2.90.0100.01017.07
7.2.80.0090.01116.65
7.2.70.0170.00717.02
7.2.60.0150.00616.68
7.2.50.0100.00816.81
7.2.40.0080.01017.00
7.2.30.0140.00816.88
7.2.20.0120.00516.87
7.2.10.0160.00516.78
7.2.00.0070.00817.86
7.1.330.0040.01216.15
7.1.320.0000.01615.79
7.1.310.0000.01016.14
7.1.300.0090.00416.11
7.1.290.0110.00016.10
7.1.280.0080.00415.94
7.1.270.0030.01015.83
7.1.260.0100.00315.83
7.1.250.0130.00315.78
7.1.240.0070.00716.05
7.1.230.0100.00316.12
7.1.220.0090.00615.94
7.1.210.0060.00615.96
7.1.200.0030.00915.93
7.1.190.0060.00615.96
7.1.180.0030.00616.04
7.1.170.0040.00415.89
7.1.160.0040.01115.88
7.1.150.0030.00715.84
7.1.140.0070.00715.91
7.1.130.0030.01015.89
7.1.120.0060.00915.69
7.1.110.0030.01016.15
7.1.100.0030.01017.16
7.1.90.0030.00615.91
7.1.80.0110.00415.86
7.1.70.0050.00516.70
7.1.60.0030.01317.61
7.1.50.0040.01016.51
7.1.40.0100.00715.69
7.1.30.0030.00815.99
7.1.20.0060.00616.00
7.1.10.0100.00715.85
7.1.00.0080.04019.21
7.0.330.0070.00715.40
7.0.320.0040.00715.48
7.0.310.0000.01215.57
7.0.300.0030.00915.50
7.0.290.0030.01015.36
7.0.280.0040.00415.63
7.0.270.0000.01115.69
7.0.260.0000.00915.61
7.0.250.0040.00815.63
7.0.240.0030.01015.43
7.0.230.0100.00315.77
7.0.220.0030.00715.75
7.0.210.0040.00415.70
7.0.200.0230.00615.30
7.0.190.0100.00615.46
7.0.180.0100.00315.62
7.0.170.0060.00915.57
7.0.160.0000.01415.45
7.0.150.0040.00715.59
7.0.140.0080.04018.76
7.0.130.0070.00315.67
7.0.120.0000.01115.51
7.0.110.0030.00915.58
7.0.100.0070.02217.80
7.0.90.0080.02817.74
7.0.80.0030.02217.66
7.0.70.0080.02417.72
7.0.60.0010.02417.82
7.0.50.0000.02617.95
7.0.40.0020.02216.92
7.0.30.0110.01616.82
7.0.20.0020.02516.87
7.0.10.0070.03516.89
7.0.00.0070.04416.85
5.6.400.0070.00714.54
5.6.390.0040.00714.63
5.6.380.0030.00614.61
5.6.370.0060.00614.16
5.6.360.0060.00614.25
5.6.350.0110.00314.68
5.6.340.0040.00814.22
5.6.330.0060.00614.34
5.6.320.0030.01014.62
5.6.310.0030.00714.36
5.6.300.0030.01314.39
5.6.290.0100.00714.26
5.6.280.0100.03317.85
5.6.270.0090.00614.11
5.6.260.0040.01114.11
5.6.250.0070.02217.48
5.6.240.0030.02917.49
5.6.230.0060.01817.53
5.6.220.0030.02317.56
5.6.210.0040.02617.41
5.6.200.0020.02617.63
5.6.190.0000.03017.86
5.6.180.0090.01717.67
5.6.170.0010.02317.57
5.6.160.0060.04117.78
5.6.150.0020.05217.69
5.6.140.0070.03417.74
5.6.130.0030.02717.62
5.6.120.0080.04517.68
5.6.110.0050.04817.80
5.6.100.0050.03017.54
5.6.90.0070.02217.75
5.6.80.0000.04117.32
5.6.70.0020.04717.28
5.6.60.0070.04017.35
5.6.50.0070.02917.44
5.6.40.0100.03917.33
5.6.30.0040.04417.49
5.6.20.0100.02017.34
5.6.10.0030.02517.48
5.6.00.0030.02917.30
5.5.380.0050.02017.42
5.5.370.0050.02017.33
5.5.360.0070.02017.36
5.5.350.0020.02417.26
5.5.340.0100.01517.69
5.5.330.0050.02017.37
5.5.320.0100.01317.59
5.5.310.0100.04317.59
5.5.300.0020.04117.69
5.5.290.0080.03317.62
5.5.280.0100.02017.52
5.5.270.0030.02217.64
5.5.260.0070.04517.64
5.5.250.0080.02117.38
5.5.240.0070.04317.21
5.5.230.0060.04117.16
5.5.220.0030.03817.27
5.5.210.0030.03017.25
5.5.200.0120.03317.18
5.5.190.0050.02717.24
5.5.180.0030.03917.21
5.5.170.0070.00714.06
5.5.160.0040.02517.21
5.5.150.0050.02817.28
5.5.140.0010.02617.13
5.5.130.0050.03917.11
5.5.120.0090.03217.04
5.5.110.0110.02817.18
5.5.100.0000.03817.30
5.5.90.0070.04317.21
5.5.80.0130.03617.28
5.5.70.0080.03417.11
5.5.60.0100.03817.03
5.5.50.0050.04317.11
5.5.40.0090.02017.18
5.5.30.0120.02517.26
5.5.20.0060.02017.07
5.5.10.0070.04217.22
5.5.00.0070.02517.18
5.4.450.0130.03015.21
5.4.440.0000.03515.39
5.4.430.0020.02415.31
5.4.420.0070.03215.25
5.4.410.0060.01815.11
5.4.400.0010.02714.96
5.4.390.0140.03215.07
5.4.380.0050.03314.78
5.4.370.0050.02315.07
5.4.360.0030.03715.01
5.4.350.0030.02815.05
5.4.340.0050.02515.02
5.4.330.0000.01311.08
5.4.320.0090.03214.99
5.4.310.0070.02615.00
5.4.300.0070.03715.12
5.4.290.0020.02515.03
5.4.280.0040.03815.00
5.4.270.0030.02414.95
5.4.260.0030.02415.03
5.4.250.0050.03015.04
5.4.240.0050.02214.85
5.4.230.0050.03615.12
5.4.220.0050.03015.13
5.4.210.0070.02214.85
5.4.200.0090.03715.01
5.4.190.0050.02415.10
5.4.180.0070.03514.91
5.4.170.0060.03314.79
5.4.160.0020.02715.07
5.4.150.0080.03015.08
5.4.140.0080.02613.78
5.4.130.0100.02513.64
5.4.120.0080.02013.53
5.4.110.0080.02213.79
5.4.100.0050.04013.81
5.4.90.0030.02813.76
5.4.80.0050.04313.67
5.4.70.0030.03813.57
5.4.60.0030.01913.64
5.4.50.0050.02113.70
5.4.40.0020.04213.72
5.4.30.0020.03013.75
5.4.20.0030.02813.58
5.4.10.0060.02313.58
5.4.00.0050.02013.28
5.3.290.0050.03812.53
5.3.280.0020.02512.44
5.3.270.0050.02312.38
5.3.260.0050.03412.33
5.3.250.0040.02712.47
5.3.240.0030.02612.47
5.3.230.0030.03212.47
5.3.220.0060.03612.45
5.3.210.0150.02712.48
5.3.200.0050.04012.47
5.3.190.0040.02512.49
5.3.180.0060.02012.48
5.3.170.0080.03812.52
5.3.160.0070.02512.45
5.3.150.0030.01812.54
5.3.140.0030.04312.52
5.3.130.0000.02412.39
5.3.120.0030.04312.44
5.3.110.0040.03712.33
5.3.100.0030.01812.20
5.3.90.0070.03712.16
5.3.80.0040.02011.92
5.3.70.0040.01812.15
5.3.60.0050.03512.08
5.3.50.0030.02312.08
5.3.40.0070.02712.09
5.3.30.0080.03512.12
5.3.20.0060.03012.02
5.3.10.0050.01811.93
5.3.00.0050.03211.90
5.2.170.0000.02711.13
5.2.160.0070.02011.16
5.2.150.0030.06711.18
5.2.140.0030.02710.97
5.2.130.0070.04711.09
5.2.120.0070.03710.88
5.2.110.0030.03711.02
5.2.100.0000.02710.91
5.2.90.0100.05011.10
5.2.80.0030.03311.08
5.2.70.0030.06011.04
5.2.60.0070.02711.08
5.2.50.0070.05310.94
5.2.40.0000.03310.92
5.2.30.0070.02710.97
5.2.20.0030.04310.91
5.2.10.0070.02710.92
5.2.00.0030.04310.63
5.1.60.0070.04010.03
5.1.50.0030.02010.00
5.1.40.0070.0309.96
5.1.30.0030.02710.41
5.1.20.0030.02710.39
5.1.10.0030.04010.08
5.1.00.0000.02310.05
5.0.50.0000.0278.38
5.0.40.0000.0278.39
5.0.30.0070.0308.21
5.0.20.0030.0278.23
5.0.10.0030.0178.15
5.0.00.0000.0378.14
4.4.90.0070.0178.12
4.4.80.0030.0138.12
4.4.70.0000.0178.12
4.4.60.0000.0408.12
4.4.50.0000.0178.12
4.4.40.0000.0238.12
4.4.30.0000.0338.12
4.4.20.0000.0138.12
4.4.10.0000.0308.12
4.4.00.0000.0338.12
4.3.110.0000.0178.12
4.3.100.0030.0308.12
4.3.90.0000.0138.12
4.3.80.0030.0508.12
4.3.70.0000.0238.12
4.3.60.0000.0308.12
4.3.50.0000.0138.12
4.3.40.0000.0238.12
4.3.30.0070.0208.12
4.3.20.0000.0178.12
4.3.10.0070.0078.12
4.3.00.0000.0278.12

preferences:
51.65 ms | 401 KiB | 5 Q