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( '/[\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.0150.00418.30
8.3.60.0120.00618.55
8.3.50.0140.00222.05
8.3.40.0060.00918.78
8.3.30.0110.00418.79
8.3.20.0080.00018.74
8.3.10.0050.00320.92
8.3.00.0080.00021.91
8.2.180.0120.00316.73
8.2.170.0040.01122.96
8.2.160.0110.00420.21
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0090.00926.16
8.2.120.0070.00721.13
8.2.110.0090.00020.48
8.2.100.0040.00817.84
8.2.90.0080.00019.21
8.2.80.0000.00818.03
8.2.70.0050.00317.75
8.2.60.0080.00017.79
8.2.50.0050.00518.07
8.2.40.0000.00818.16
8.2.30.0020.00519.52
8.2.20.0060.00317.70
8.2.10.0050.00317.90
8.2.00.0080.00017.85
8.1.280.0140.00425.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0070.00323.84
8.1.230.0080.00420.91
8.1.220.0030.00618.77
8.1.210.0030.00518.94
8.1.200.0030.00617.35
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0000.00818.71
8.1.160.0000.00718.77
8.1.150.0040.00418.76
8.1.140.0000.00717.53
8.1.130.0000.00717.79
8.1.120.0000.00717.56
8.1.110.0000.00817.58
8.1.100.0020.00517.42
8.1.90.0040.00417.52
8.1.80.0000.00717.43
8.1.70.0000.00717.53
8.1.60.0030.00617.72
8.1.50.0040.00417.46
8.1.40.0000.01017.62
8.1.30.0000.00817.78
8.1.20.0080.00017.72
8.1.10.0000.00717.54
8.1.00.0040.00817.52
8.0.300.0070.00019.94
8.0.290.0040.00417.05
8.0.280.0040.00418.37
8.0.270.0000.00717.27
8.0.260.0060.00316.85
8.0.250.0000.00717.09
8.0.240.0030.00517.14
8.0.230.0040.00417.04
8.0.220.0030.00316.98
8.0.210.0030.00316.98
8.0.200.0000.00717.07
8.0.190.0000.00716.93
8.0.180.0040.00416.97
8.0.170.0040.00416.98
8.0.160.0030.00517.02
8.0.150.0030.00316.78
8.0.140.0030.00316.93
8.0.130.0000.00513.35
8.0.120.0040.00416.96
8.0.110.0050.00216.85
8.0.100.0040.00416.92
8.0.90.0040.00416.87
8.0.80.0130.00316.90
8.0.70.0000.00716.88
8.0.60.0030.00616.84
8.0.50.0000.00816.91
8.0.30.0110.00817.33
8.0.20.0080.01017.40
8.0.10.0000.00716.97
8.0.00.0110.00616.82
7.4.330.0030.00316.85
7.4.320.0030.00316.66
7.4.300.0070.00016.77
7.4.290.0000.00816.73
7.4.280.0040.00416.65
7.4.270.0070.00016.64
7.4.260.0000.00513.42
7.4.250.0070.00016.72
7.4.240.0070.00016.75
7.4.230.0040.00416.86
7.4.220.0060.01316.64
7.4.210.0050.00916.73
7.4.200.0070.00016.75
7.4.190.0030.00316.91
7.4.160.0110.00616.68
7.4.150.0000.02017.40
7.4.140.0070.01017.86
7.4.130.0130.00616.54
7.4.120.0110.00516.61
7.4.110.0070.01016.52
7.4.100.0160.00616.47
7.4.90.0140.00416.61
7.4.80.0070.01019.39
7.4.70.0120.00916.61
7.4.60.0100.01216.57
7.4.50.0030.00616.67
7.4.40.0070.01022.77
7.4.30.0050.01116.60
7.4.00.0020.01715.12
7.3.330.0030.00213.26
7.3.320.0030.00313.28
7.3.310.0000.00716.38
7.3.300.0070.00016.35
7.3.290.0090.00616.35
7.3.280.0060.01016.38
7.3.270.0150.00617.40
7.3.260.0160.01018.24
7.3.250.0150.00316.57
7.3.240.0060.01016.41
7.3.230.0090.00916.80
7.3.210.0130.00316.63
7.3.200.0070.01819.39
7.3.190.0080.00816.38
7.3.180.0090.00916.74
7.3.170.0110.00816.58
7.3.160.0070.01316.56
7.3.120.0100.00614.88
7.3.110.0040.01115.14
7.3.100.0030.01415.14
7.3.90.0060.00614.73
7.3.80.0060.00615.10
7.3.70.0090.00315.00
7.3.60.0030.00714.62
7.3.50.0060.00314.96
7.3.40.0070.00714.96
7.3.30.0130.00314.73
7.3.20.0030.01216.45
7.3.10.0090.00616.53
7.3.00.0080.00616.73
7.2.330.0120.00616.81
7.2.320.0090.00916.62
7.2.310.0090.01216.76
7.2.300.0130.00316.62
7.2.290.0090.00916.75
7.2.250.0120.00415.24
7.2.240.0110.00715.36
7.2.230.0100.00715.06
7.2.220.0070.00714.92
7.2.210.0030.01014.87
7.2.200.0000.01315.18
7.2.190.0090.00014.96
7.2.180.0060.00615.05
7.2.170.0060.00915.25
7.2.130.0060.00916.88
7.2.120.0050.00816.95
7.2.110.0070.00817.08
7.2.100.0040.00916.91
7.2.90.0060.01316.96
7.2.80.0070.01217.04
7.2.70.0100.00616.89
7.2.60.0090.00816.89
7.2.50.0060.00916.89
7.2.40.0050.01216.99
7.2.30.0140.00416.93
7.2.20.0080.00816.90
7.2.10.0060.01016.93
7.2.00.0070.00817.59
7.1.330.0000.01715.88
7.1.320.0070.00715.74
7.1.310.0030.01015.57
7.1.300.0060.00315.83
7.1.290.0060.00615.73
7.1.280.0120.00616.07
7.1.270.0080.00815.67
7.1.260.0060.00315.64
7.1.250.0090.00415.87
7.1.240.0080.00815.76
7.1.230.0050.01015.82
7.1.220.0050.00915.91
7.1.210.0100.00615.79
7.1.200.0080.00615.73
7.1.190.0020.01316.02
7.1.180.0080.00716.03
7.1.170.0070.00716.01
7.1.160.0100.00715.59
7.1.150.0050.01015.92
7.1.140.0050.00815.94
7.1.130.0090.00315.86
7.1.120.0040.01116.02
7.1.110.0110.00715.92
7.1.100.0110.00816.50
7.1.90.0030.01115.99
7.1.80.0090.00515.88
7.1.70.0060.00616.29
7.1.60.0020.01317.14
7.1.50.0060.01016.18
7.1.40.0060.00515.73
7.1.30.0050.00815.81
7.1.20.0070.00516.01
7.1.10.0030.01015.85
7.1.00.0050.02718.13
7.0.330.0070.00915.40
7.0.320.0060.00815.42
7.0.310.0090.00515.34
7.0.300.0070.00915.58
7.0.290.0110.00515.45
7.0.280.0120.00315.29
7.0.270.0060.00815.64
7.0.260.0030.00815.51
7.0.250.0050.00815.61
7.0.240.0100.00715.50
7.0.230.0080.00515.38
7.0.220.0020.01015.33
7.0.210.0070.00315.48
7.0.200.0050.00715.90
7.0.190.0040.00815.18
7.0.180.0060.00815.38
7.0.170.0010.00915.53
7.0.160.0110.00315.49
7.0.150.0040.00715.63
7.0.140.0000.03417.68
7.0.130.0080.00215.47
7.0.120.0020.00915.29
7.0.110.0030.01015.48
7.0.100.0050.00715.40
7.0.90.0080.00515.34
7.0.80.0070.00815.60
7.0.70.0070.02917.46
7.0.60.0110.03117.53
7.0.50.0050.03517.74
7.0.40.0090.03115.75
7.0.30.0080.03015.60
7.0.20.0110.02015.66
7.0.10.0080.01815.78
7.0.00.0070.02515.83
5.6.380.0100.00514.53
5.6.370.0090.00614.02
5.6.360.0030.01014.20
5.6.350.0030.01014.40
5.6.340.0060.00614.33
5.6.330.0040.00814.07
5.6.320.0040.01114.40
5.6.310.0060.00514.14
5.6.300.0040.00914.12
5.6.290.0030.00714.16
5.6.280.0110.00314.33
5.6.270.0070.00614.09
5.6.260.0080.00714.20
5.6.250.0100.00213.96
5.6.240.0050.00713.94
5.6.230.0060.00614.12
5.6.220.0060.02316.44
5.6.210.0080.03116.17
5.6.200.0040.03716.24
5.6.190.0050.03316.28
5.6.180.0100.02816.41
5.6.170.0070.03116.38
5.6.160.0060.02016.27
5.6.150.0090.01916.41
5.6.140.0040.02016.40
5.6.130.0090.02516.36
5.6.120.0100.01616.53
5.6.110.0070.02016.36
5.6.100.0060.01816.42
5.6.90.0060.02716.43
5.6.80.0060.01816.21
5.6.70.0070.02916.16
5.6.60.0060.01816.19
5.6.50.0040.01716.32
5.6.40.0050.03016.19
5.6.30.0060.01816.17
5.6.20.0080.01416.12
5.6.10.0070.02116.22
5.6.00.0040.02016.09
5.5.380.0020.01111.21
5.5.370.0070.00511.00
5.5.360.0060.02014.08
5.5.350.0060.02714.19
5.5.340.0030.03414.32
5.5.330.0060.01714.20
5.5.320.0040.03414.25
5.5.310.0050.02014.32
5.5.300.0060.01914.27
5.5.290.0060.01914.25
5.5.280.0070.01614.31
5.5.270.0080.01614.43
5.5.260.0060.02514.29
5.5.250.0090.01814.32
5.5.240.0080.01814.08
5.5.230.0030.01914.05
5.5.220.0070.01614.09
5.5.210.0070.01414.21
5.5.200.0050.01814.13
5.5.190.0020.01614.16
5.5.180.0050.01714.14
5.5.170.0080.00011.11
5.5.160.0080.01314.08
5.5.150.0070.01414.12
5.5.140.0060.01314.04
5.5.130.0010.02014.08
5.5.120.0060.01514.12
5.5.110.0050.01614.04
5.5.100.0060.01514.03
5.5.90.0080.01414.12
5.5.80.0010.01714.11
5.5.70.0030.01814.01
5.5.60.0060.01514.04
5.5.50.0050.01514.04
5.5.40.0020.01914.08
5.5.30.0030.01814.03
5.5.20.0060.01514.10
5.5.10.0050.02814.02
5.5.00.0080.02414.04
5.4.450.0040.01813.84
5.4.440.0070.01513.89
5.4.430.0080.01713.86
5.4.420.0050.01913.84
5.4.410.0040.02013.74
5.4.400.0050.01413.72
5.4.390.0010.02013.59
5.4.380.0040.02813.73
5.4.370.0060.01613.74
5.4.360.0060.01413.67
5.4.350.0050.02213.70
5.4.340.0040.01513.73
5.4.330.0060.00511.10
5.4.320.0030.01413.61
5.4.310.0040.01413.74
5.4.300.0030.01713.76
5.4.290.0040.01513.72
5.4.280.0030.01613.68
5.4.270.0070.01313.74
5.4.260.0020.01813.74
5.4.250.0050.01413.65
5.4.240.0060.01213.72
5.4.230.0060.01413.74
5.4.220.0100.01313.67
5.4.210.0080.01313.69
5.4.200.0070.02613.66
5.4.190.0030.01913.62
5.4.180.0010.02013.65
5.4.170.0060.02913.71
5.4.160.0070.02213.66
5.4.150.0050.03213.69
5.4.140.0060.02912.81
5.4.130.0030.03112.81
5.4.120.0040.02512.84
5.4.110.0060.02812.78
5.4.100.0030.02312.79
5.4.90.0020.03112.88
5.4.80.0040.02912.75
5.4.70.0030.02312.72
5.4.60.0040.01612.93
5.4.50.0050.02112.80
5.4.40.0050.02612.81
5.4.30.0040.02312.84
5.4.20.0040.02712.77
5.4.10.0020.02812.79
5.4.00.0060.02612.54
5.3.290.0010.01912.10
5.3.280.0010.02112.09
5.3.270.0030.02112.10
5.3.260.0030.01812.07
5.3.250.0050.01312.08
5.3.240.0060.02712.08
5.3.230.0050.03012.05
5.3.220.0070.02112.08
5.3.210.0060.02912.05
5.3.200.0050.02912.08
5.3.190.0070.02512.08
5.3.180.0050.01812.08
5.3.170.0050.02612.08
5.3.160.0010.02412.02
5.3.150.0040.02612.08
5.3.140.0070.01912.05
5.3.130.0060.01912.06
5.3.120.0050.02912.06
5.3.110.0060.02812.03
5.3.100.0030.03311.89
5.3.90.0030.02411.93
5.3.80.0040.02911.89
5.3.70.0050.02811.90
5.3.60.0040.02411.88
5.3.50.0050.02111.83
5.3.40.0040.02811.86
5.3.30.0060.02611.86
5.3.20.0060.02811.79
5.3.10.0040.02611.70
5.3.00.0020.02211.76
5.2.170.0050.02311.29
5.2.160.0040.02411.29
5.2.150.0040.02411.29
5.2.140.0030.02311.29
5.2.130.0040.02411.29
5.2.120.0020.02711.29
5.2.110.0060.02111.29
5.2.100.0050.02211.29
5.2.90.0040.02411.29
5.2.80.0010.02811.29
5.2.70.0030.02311.29
5.2.60.0040.02511.29
5.2.50.0040.02211.29
5.2.40.0020.02411.29
5.2.30.0030.02411.29
5.2.20.0030.02411.29
5.2.10.0020.01911.29
5.2.00.0060.01911.29
5.1.60.0050.01911.29
5.1.50.0060.01711.29
5.1.40.0020.02011.29
5.1.30.0020.02311.29
5.1.20.0050.01711.29
5.1.10.0030.02111.29
5.1.00.0020.02211.29
5.0.50.0010.01911.29
5.0.40.0010.01911.29
5.0.30.0010.02511.29
5.0.20.0030.01711.29
5.0.10.0020.01611.29
5.0.00.0030.02011.29
4.4.90.0010.01311.29
4.4.80.0020.01311.29
4.4.70.0010.01611.29
4.4.60.0000.01511.29
4.4.50.0020.01511.29
4.4.40.0020.01711.29
4.4.30.0030.01311.29
4.4.20.0010.01511.29
4.4.10.0030.01011.29
4.4.00.0020.02111.29
4.3.110.0010.01611.29
4.3.100.0030.01311.29
4.3.90.0010.01411.29
4.3.80.0040.01611.29
4.3.70.0020.01311.29
4.3.60.0010.01211.29
4.3.50.0030.01311.29
4.3.40.0030.01711.29
4.3.30.0020.01411.29
4.3.20.0010.01511.29
4.3.10.0010.01611.29
4.3.00.0000.01511.29

preferences:
40.53 ms | 401 KiB | 5 Q