3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "\xC2°Freen\x18 ew°\x90ɮ\x7F"; //$result="a\xC2"; //$result = preg_replace('~[\x{0000}-\x{000F}\x{007F}-\x{00a0}]~S', '', $result); $result = preg_replace('~[\x{0000}-\x{000F}\x{007F}-\x{00a0}\p{Z}*]~', '?', $result); $string = "°Freen\x18 ew°\x90ɮ\x7F\xc2"; $string = preg_replace("#[\x09\x0A\x0D\x20-\x7E]#" ,"",$string); // ASCII $string = preg_replace("#[\xC2-\xDF][\x80-\xBF]#" ,"",$string); // non-overlong 2-byte $string = preg_replace("#\xE0[\xA0-\xBF][\x80-\xBF]#" ,"",$string); // excluding overlongs $string = preg_replace("#[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}#","",$string); // straight 3-byte $string = preg_replace("#\xED[\x80-\x9F][\x80-\xBF]#" ,"",$string); // excluding surrogates $string = preg_replace("#\xF0[\x90-\xBF][\x80-\xBF]{2}#","",$string); // planes 1-3 $string = preg_replace("#[\xF1-\xF3][\x80-\xBF]{3}#" ,"",$string); // planes 4-15 $string = preg_replace("#\xF4[\x80-\x8F][\x80-\xBF]{2}#","",$string); // plane 16 /* //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 ); */ if($result == "\xC2") echo 'fuck'; 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.0000.01516.62
8.3.50.0120.00716.71
8.3.40.0040.01218.79
8.3.30.0150.00018.80
8.3.20.0080.00018.90
8.3.10.0040.00418.93
8.3.00.0000.00919.51
8.2.180.0100.01016.75
8.2.170.0170.00322.96
8.2.160.0100.00618.79
8.2.150.0080.00024.18
8.2.140.0100.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00421.30
8.2.110.0000.00922.20
8.2.100.0090.00317.84
8.2.90.0030.00517.75
8.2.80.0040.00418.80
8.2.70.0080.00017.75
8.2.60.0030.00517.80
8.2.50.0040.00418.07
8.2.40.0080.00019.60
8.2.30.0060.00317.82
8.2.20.0080.00517.75
8.2.10.0050.00217.99
8.2.00.0000.00817.95
8.1.280.0110.00425.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00421.80
8.1.230.0060.00620.97
8.1.220.0040.00417.89
8.1.210.0080.00018.77
8.1.200.0090.00017.38
8.1.190.0040.00417.48
8.1.180.0030.00618.10
8.1.170.0040.00418.84
8.1.160.0070.00018.99
8.1.150.0080.00018.86
8.1.140.0070.00017.66
8.1.130.0040.00417.66
8.1.120.0030.00717.63
8.1.110.0030.00617.54
8.1.100.0000.00717.59
8.1.90.0040.00417.55
8.1.80.0020.00517.65
8.1.70.0030.00517.52
8.1.60.0040.00417.75
8.1.50.0030.00617.55
8.1.40.0090.00017.74
8.1.30.0090.00017.78
8.1.20.0040.00417.76
8.1.10.0000.00817.57
8.1.00.0000.00817.48
8.0.300.0090.00018.77
8.0.290.0000.00816.75
8.0.280.0000.00718.60
8.0.270.0030.00317.16
8.0.260.0020.00518.68
8.0.250.0000.00717.13
8.0.240.0000.00717.12
8.0.230.0030.00617.11
8.0.220.0050.00316.95
8.0.210.0000.00717.07
8.0.200.0000.00816.91
8.0.190.0040.00417.11
8.0.180.0000.00716.87
8.0.170.0030.00517.02
8.0.160.0070.00016.95
8.0.150.0030.00516.98
8.0.140.0050.00516.99
8.0.130.0030.00313.38
8.0.120.0030.00616.96
8.0.110.0000.00717.11
8.0.100.0040.00417.04
8.0.90.0030.00316.87
8.0.80.0090.01217.11
8.0.70.0000.00717.01
8.0.60.0080.00017.11
8.0.50.0030.00617.11
8.0.30.0070.01617.26
8.0.20.0070.01117.47
8.0.10.0040.00417.23
8.0.00.0080.01317.06
7.4.330.0050.00013.25
7.4.320.0030.00316.94
7.4.300.0000.00716.80
7.4.290.0000.00716.81
7.4.280.0050.00216.77
7.4.270.0070.00016.93
7.4.260.0030.00313.56
7.4.250.0030.00516.77
7.4.240.0030.00316.77
7.4.230.0000.00716.63
7.4.220.0220.00316.76
7.4.210.0090.01116.88
7.4.200.0040.00416.95
7.4.190.0060.00316.95
7.4.160.0070.01016.66
7.4.150.0100.01016.75
7.4.140.0110.00717.86
7.4.130.0120.01216.78
7.4.120.0100.01016.61
7.4.110.0110.00816.78
7.4.100.0070.01116.57
7.4.90.0090.00916.75
7.4.80.0070.01019.39
7.4.70.0150.00616.66
7.4.60.0070.01016.66
7.4.50.0050.00016.64
7.4.40.0070.00716.68
7.4.30.0130.00416.82
7.4.00.0060.00615.21
7.3.330.0000.00713.14
7.3.320.0040.00413.06
7.3.310.0030.00316.40
7.3.300.0070.00016.35
7.3.290.0080.01016.37
7.3.280.0150.00416.30
7.3.270.0090.00916.55
7.3.260.0190.00616.70
7.3.240.0130.00316.66
7.3.230.0130.00316.59
7.3.210.0120.00616.33
7.3.200.0060.01016.39
7.3.190.0070.01416.36
7.3.180.0130.01316.50
7.3.170.0100.00616.39
7.3.160.0090.00616.60
7.3.120.0090.00614.84
7.2.330.0180.00016.67
7.2.320.0130.00316.73
7.2.310.0140.00816.75
7.2.300.0060.00916.80
7.2.290.0080.00816.82
7.2.00.0040.00819.80
7.1.100.0060.00618.57
7.1.70.0000.00817.37
7.1.60.0070.01819.25
7.1.50.0070.01017.34
7.1.00.0000.08022.44
7.0.200.0100.00016.89
7.0.140.0070.07322.09
7.0.120.0100.06722.01
7.0.60.0070.08019.97
7.0.50.0170.07017.74
7.0.40.0030.08720.11
7.0.30.0470.06720.12
7.0.20.0300.07020.03
7.0.10.0070.08720.11
7.0.00.0030.04020.11
5.6.210.0170.06020.73
5.6.200.0030.06718.20
5.6.190.0100.08720.47
5.6.180.3470.04320.33
5.6.170.0200.04320.52
5.6.160.0000.06020.41
5.6.150.0070.07318.20
5.6.140.0030.04718.22
5.6.130.0070.08718.07
5.6.120.0070.04321.03
5.6.110.0170.06321.07
5.6.100.0070.03721.00
5.6.90.0070.04020.97
5.6.80.0030.07720.37
5.6.70.2330.04020.37
5.5.350.0030.07320.46
5.5.340.0000.07017.98
5.5.330.0070.04720.21
5.5.320.0200.08720.13
5.5.310.0270.08020.28
5.5.300.0100.07317.98
5.5.290.0000.04717.97
5.5.280.0100.08020.68
5.5.270.0130.07720.77
5.5.260.0130.07020.87
5.5.250.0100.04020.70
5.5.240.0030.07020.16
5.4.450.0030.04019.41
5.4.440.0030.04019.13
5.4.430.0100.03319.44
5.4.420.0070.03319.41
5.4.410.0100.03019.28
5.4.400.0000.04019.15
5.4.390.0000.04019.11
5.4.380.0030.04718.75
5.4.370.0000.04318.91
5.4.360.0030.03718.81
5.4.350.0100.03319.10
5.4.340.0030.03719.18
5.4.320.0030.03718.79
5.4.310.0070.03319.14
5.4.300.0130.02719.13
5.4.290.0030.04019.07
5.4.280.0070.03319.17
5.4.270.0000.04019.10
5.4.260.0030.03718.91
5.4.250.0070.03718.79
5.4.240.0070.07019.15
5.4.230.0000.07719.17
5.4.220.0070.04019.08
5.4.210.0000.04319.04
5.4.200.0070.04319.08
5.4.190.0100.07018.78
5.4.180.0130.06318.99
5.4.170.0170.06718.90
5.4.160.0070.07319.13
5.4.150.0070.04318.98
5.4.140.0030.04316.22
5.4.130.0070.04316.24
5.4.120.0130.05716.30
5.4.110.0100.06016.41
5.4.100.0170.05016.27
5.4.90.0000.06016.36
5.4.80.0000.05016.25
5.4.70.0130.04716.22
5.4.60.0070.07016.12
5.4.50.0100.04716.38
5.4.40.0100.05016.21
5.4.30.0070.07316.38
5.4.20.0070.04716.22
5.4.10.0170.06316.21
5.4.00.0030.04315.71
5.3.290.0000.04014.62
5.3.280.0030.08014.56
5.3.270.0100.06014.69
5.3.260.0130.07314.54
5.3.250.0030.04314.62
5.3.240.0130.03314.54
5.3.230.0000.04014.52
5.3.220.0170.05314.51
5.3.210.0030.08314.49
5.3.200.0030.05014.50
5.3.190.0030.07014.51
5.3.180.0030.06014.51
5.3.170.0070.07314.53
5.3.160.0030.07714.49
5.3.150.0100.05314.58
5.3.140.0100.06714.65
5.3.130.0100.05714.48
5.3.120.0030.04314.34
5.3.110.0030.07014.47
5.3.100.0100.07014.12
5.3.90.0100.04013.82
5.3.80.0100.03013.86
5.3.70.0130.07313.98
5.3.60.0070.04713.82
5.3.50.0070.07013.77
5.3.40.0170.05713.76
5.3.30.0070.04313.93
5.3.20.0100.03013.62
5.3.10.0070.07313.47
5.3.00.0000.04313.58
5.2.170.0000.06711.14
5.2.160.0100.05711.08
5.2.150.0170.02311.08
5.2.140.0070.03311.13
5.2.130.0070.06710.97
5.2.120.0070.06011.07
5.2.110.0070.06311.09
5.2.100.0070.04011.28
5.2.90.0070.06011.09
5.2.80.0070.06010.95
5.2.70.0070.05711.08
5.2.60.0000.06010.93
5.2.50.0070.03711.03
5.2.40.0070.05710.94
5.2.30.0000.04311.13
5.2.20.0070.06310.92
5.2.10.0030.05310.85
5.2.00.0000.06310.70
5.1.60.0030.0539.99
5.1.50.0030.05710.09
5.1.40.0000.0279.96
5.1.30.0030.02710.38
5.1.20.0030.02710.34
5.1.10.0030.03710.06
5.1.00.0030.05710.07
5.0.50.0070.0308.54
5.0.40.0000.0508.32
5.0.30.0070.0678.25
5.0.20.0030.0438.18
5.0.10.0030.0438.20
5.0.00.0000.0608.23
4.4.90.0030.0307.79
4.4.80.0030.0177.79
4.4.70.0030.0307.79
4.4.60.0000.0337.79
4.4.50.0000.0337.79
4.4.40.0100.0477.79
4.4.30.0030.0307.79
4.4.20.0000.0407.79
4.4.10.0030.0337.79
4.4.00.0030.0577.79
4.3.110.0000.0307.79
4.3.100.0000.0377.79
4.3.90.0030.0307.79
4.3.80.0000.0577.79
4.3.70.0030.0407.79
4.3.60.0070.0307.79
4.3.50.0000.0377.79
4.3.40.0030.0477.79
4.3.30.0000.0337.79
4.3.20.0000.0177.79
4.3.10.0000.0207.79
4.3.00.0030.0307.79

preferences:
68.52 ms | 401 KiB | 5 Q