3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xa0\xc2"; //$result = trim($result,"\xc2"/*"\xa0"*/); //echo preg_replace('#[\x00-\x1F\x7F-\x9F]#S', '', $result); //echo preg_replace('~[\x{0000}-\x{001F}\x{007F}-\x{00a0}]~', '', $result); echo preg_replace('~[\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.27
8.3.50.0070.01122.04
8.3.40.0100.00718.92
8.3.30.0110.00418.96
8.3.20.0040.00418.70
8.3.10.0080.00020.92
8.3.00.0070.00723.52
8.2.180.0070.01418.50
8.2.170.0140.00422.96
8.2.160.0040.01120.38
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00519.61
8.2.110.0060.00320.64
8.2.100.0110.00017.91
8.2.90.0030.00619.23
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0030.00517.93
8.2.50.0080.00018.07
8.2.40.0050.00518.16
8.2.30.0060.00321.23
8.2.20.0040.00417.82
8.2.10.0070.00017.65
8.2.00.0030.00617.75
8.1.280.0120.00325.92
8.1.270.0040.00422.14
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0060.00322.44
8.1.230.0040.00720.90
8.1.220.0040.00418.77
8.1.210.0000.00818.89
8.1.200.0090.00317.34
8.1.190.0080.00017.38
8.1.180.0080.00018.10
8.1.170.0080.00018.71
8.1.160.0000.00718.85
8.1.150.0030.00518.60
8.1.140.0040.00417.48
8.1.130.0070.00017.46
8.1.120.0080.00017.59
8.1.110.0030.00617.58
8.1.100.0040.00417.58
8.1.90.0000.00717.63
8.1.80.0050.00317.54
8.1.70.0000.00817.54
8.1.60.0000.01017.66
8.1.50.0000.00717.61
8.1.40.0040.00417.61
8.1.30.0000.00817.76
8.1.20.0030.00517.64
8.1.10.0050.00217.68
8.1.00.0030.00617.53
8.0.300.0070.00019.89
8.0.290.0050.00317.04
8.0.280.0000.00818.39
8.0.270.0000.00717.19
8.0.260.0030.00316.97
8.0.250.0040.00417.05
8.0.240.0040.00717.08
8.0.230.0000.00716.95
8.0.220.0030.00716.86
8.0.210.0040.00416.97
8.0.200.0000.00716.95
8.0.190.0070.00017.05
8.0.180.0030.00517.00
8.0.170.0030.00617.00
8.0.160.0040.00416.97
8.0.150.0000.00816.95
8.0.140.0030.00316.97
8.0.130.0030.00313.45
8.0.120.0040.00416.87
8.0.110.0040.00416.93
8.0.100.0030.00416.93
8.0.90.0030.00316.76
8.0.80.0160.00716.96
8.0.70.0000.00816.99
8.0.60.0040.00416.85
8.0.50.0000.00816.85
8.0.30.0060.01817.11
8.0.20.0070.01217.40
8.0.10.0070.00016.93
8.0.00.0070.01116.75
7.4.330.0000.00515.13
7.4.320.0040.00416.76
7.4.300.0030.00316.67
7.4.290.0000.00816.64
7.4.280.0000.00716.59
7.4.270.0030.00316.76
7.4.260.0060.00013.45
7.4.250.0050.00216.71
7.4.240.0030.00616.64
7.4.230.0000.00716.64
7.4.220.0090.01516.46
7.4.210.0050.01116.66
7.4.200.0030.00316.76
7.4.190.0050.00216.47
7.4.160.0060.01616.45
7.4.150.0130.00417.40
7.4.140.0120.00517.86
7.4.130.0080.01116.62
7.4.120.0120.00616.61
7.4.110.0100.00716.41
7.4.100.0080.00816.66
7.4.90.0130.01016.91
7.4.80.0070.01019.39
7.4.70.0180.00416.57
7.4.60.0070.01016.69
7.4.50.0060.00316.81
7.4.40.0090.00322.77
7.4.30.0120.00916.65
7.4.00.0100.00715.19
7.3.330.0020.00213.20
7.3.320.0000.00613.12
7.3.310.0070.00016.42
7.3.300.0070.00016.28
7.3.290.0060.01216.25
7.3.280.0090.00816.29
7.3.270.0120.00417.40
7.3.260.0110.00818.24
7.3.250.0080.01016.43
7.3.240.0090.00616.45
7.3.230.0130.01016.77
7.3.210.0090.00916.39
7.3.200.0060.01519.39
7.3.190.0120.00616.31
7.3.180.0090.00616.60
7.3.170.0130.00316.32
7.3.160.0080.00816.11
7.3.120.0070.00314.81
7.3.10.0130.01016.45
7.3.00.0150.00716.40
7.2.330.0030.01416.60
7.2.320.0150.00316.61
7.2.310.0030.01716.66
7.2.300.0030.01316.47
7.2.290.0070.01016.76
7.2.130.0160.01216.73
7.2.120.0210.00416.47
7.2.110.0130.01016.70
7.2.100.0150.00616.65
7.2.90.0140.00716.59
7.2.80.0100.01016.18
7.2.70.0070.01116.53
7.2.60.0200.00316.66
7.2.50.0160.00516.70
7.2.40.0130.00816.59
7.2.30.0110.01116.90
7.2.20.0110.00716.58
7.2.10.0170.01016.74
7.2.00.0060.01118.17
7.1.250.0170.01015.45
7.1.200.0060.00615.94
7.1.100.0040.00818.38
7.1.70.0060.00317.06
7.1.60.0090.01519.08
7.1.50.0180.00417.09
7.1.00.0030.03322.25
7.0.200.0030.00616.61
7.0.140.0030.07022.13
7.0.80.0600.07719.88
7.0.70.0600.07319.80
7.0.60.0470.06319.90
7.0.50.0530.08720.30
7.0.40.0100.07720.03
7.0.30.0130.03720.13
7.0.20.0070.05020.10
7.0.10.0130.06720.10
7.0.00.0070.05719.95
5.6.280.0030.07321.07
5.6.230.0070.08720.54
5.6.220.0100.08020.70
5.6.210.0030.06320.56
5.6.200.0030.06321.07
5.6.190.0030.08021.02
5.6.180.0130.06020.93
5.6.170.0000.04721.16
5.6.160.0130.07721.10
5.6.150.0070.05321.03
5.6.140.0070.05320.95
5.6.130.0070.07320.94
5.6.120.0130.05321.02
5.6.110.0070.04720.92
5.6.100.0130.07720.95
5.6.90.0100.07721.11
5.6.80.0170.07320.46
5.6.70.0130.06720.45
5.6.60.0100.08020.49
5.6.50.0070.08320.50
5.6.40.0100.07720.39
5.6.30.0100.07720.40
5.6.20.0130.07320.46
5.6.10.0030.08020.30
5.6.00.0130.06720.42
5.5.370.0030.08320.39
5.5.360.0130.07720.37
5.5.350.0100.08320.45
5.5.340.0030.08720.64
5.5.330.0030.09020.87
5.5.320.0000.08720.77
5.5.310.0070.05020.77
5.5.300.0030.05020.86
5.5.290.0100.05720.82
5.5.280.0070.06320.72
5.5.270.0130.05720.78
5.5.260.0200.06320.91
5.5.250.0170.07320.69
5.5.240.0070.04320.20
5.5.230.0030.07720.29
5.5.220.0100.07720.09
5.5.210.0200.06320.22
5.5.200.0100.07720.12
5.5.190.0000.08720.25
5.5.180.0100.07320.20
5.5.160.0100.06720.27
5.5.150.0030.05319.98
5.5.140.0030.05720.22
5.5.130.0100.07320.13
5.5.120.0100.08320.07
5.5.110.0100.08319.98
5.5.100.0030.08020.13
5.5.90.0130.07720.05
5.5.80.0100.06320.03
5.5.70.0030.08020.04
5.5.60.0100.04020.05
5.5.50.0100.07720.09
5.5.40.0030.04020.07
5.5.30.0100.04020.09
5.5.20.0070.04720.08
5.5.10.0130.04019.99
5.5.00.0100.04319.98
5.4.450.0000.04719.37
5.4.440.0030.08719.40
5.4.430.0100.07719.11
5.4.420.0070.07319.44
5.4.410.0070.04319.31
5.4.400.0100.07319.07
5.4.390.0030.07319.03
5.4.380.0070.04319.26
5.4.370.0070.07318.95
5.4.360.0100.06319.04
5.4.350.0030.08019.15
5.4.340.0000.08319.09
5.4.320.0030.04718.95
5.4.310.0070.04018.90
5.4.300.0070.07718.90
5.4.290.0130.06719.07
5.4.280.0030.08319.24
5.4.270.0100.05719.23
5.4.260.0030.08319.23
5.4.250.0030.05019.11
5.4.240.0030.06019.04
5.4.230.0100.04318.89
5.4.220.0070.04018.94
5.4.210.0100.04719.07
5.4.200.0070.08019.14
5.4.190.0170.05719.06
5.4.180.0070.07719.13
5.4.170.0070.06019.04
5.4.160.0130.04718.76
5.4.150.0000.07018.88
5.4.140.0100.05316.36
5.4.130.0030.07316.27
5.4.120.0070.06716.26
5.4.110.0030.04316.36
5.4.100.0030.07316.21
5.4.90.0030.04316.43
5.4.80.0030.06716.32
5.4.70.0000.07716.31
5.4.60.0100.07016.41
5.4.50.0100.06716.23
5.4.40.0000.06716.23
5.4.30.0100.06716.18
5.4.20.0130.06316.27
5.4.10.0100.07016.38
5.4.00.0030.05315.79
5.3.290.0000.06714.52
5.3.280.0070.05314.54
5.3.270.0100.07714.55
5.3.260.0200.06714.46
5.3.250.0030.06014.59
5.3.240.0030.08014.59
5.3.230.0030.04714.55
5.3.220.0070.05014.50
5.3.210.0100.05014.42
5.3.200.0130.06714.55
5.3.190.0130.03314.55
5.3.180.0130.03314.50
5.3.170.0070.06714.46
5.3.160.0070.06714.54
5.3.150.0070.07714.47
5.3.140.0030.06714.54
5.3.130.0130.07014.50
5.3.120.0070.05014.38
5.3.110.0070.07314.50
5.3.100.0030.07714.02
5.3.90.0070.07714.03
5.3.80.0170.06313.77
5.3.70.0030.07713.88
5.3.60.0070.06313.98
5.3.50.0070.04313.93
5.3.40.0070.04313.79
5.3.30.0030.03713.88
5.3.20.0070.03713.67
5.3.10.0100.06313.63
5.3.00.0100.03713.54
5.2.170.0000.04011.69
5.2.160.0030.04711.69
5.2.150.0030.03011.69
5.2.140.0030.03011.69
5.2.130.0000.03311.69
5.2.120.0000.05011.69
5.2.110.0070.05711.69
5.2.100.0130.04711.69
5.2.90.0030.04311.69
5.2.80.0070.05711.69
5.2.70.0030.03711.69
5.2.60.0030.05311.69
5.2.50.0030.06011.69
5.2.40.0000.06711.69
5.2.30.0070.05711.69
5.2.20.0000.04711.69
5.2.10.0070.05711.69
5.2.00.0000.04011.69
5.1.60.0000.03311.69
5.1.50.0000.05711.69
5.1.40.0000.05311.69
5.1.30.0100.05711.69
5.1.20.0070.05011.69
5.1.10.0030.04311.69
5.1.00.0070.05011.69
5.0.50.0030.04711.69
5.0.40.0000.03011.69
5.0.30.0000.06011.69
5.0.20.0000.04311.69
5.0.10.0070.04011.69
5.0.00.0030.07011.69
4.4.90.0000.02011.69
4.4.80.0000.02711.69
4.4.70.0000.03011.69
4.4.60.0000.03011.69
4.4.50.0000.02311.69
4.4.40.0070.04711.69
4.4.30.0030.03011.69
4.4.20.0030.03011.69
4.4.10.0030.03711.69
4.4.00.0070.04011.69
4.3.110.0030.03311.69
4.3.100.0030.03011.69
4.3.90.0000.03711.69
4.3.80.0000.05311.69
4.3.70.0070.03311.69
4.3.60.0000.03711.69
4.3.50.0030.03711.69
4.3.40.0000.05311.69
4.3.30.0070.03311.69
4.3.20.0000.04011.69
4.3.10.0000.03311.69
4.3.00.0030.02311.69

preferences:
39.7 ms | 401 KiB | 5 Q