3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\x7F\xc2"; $result="\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}\xC2]~', '', $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.0100.01016.63
8.3.50.0120.00817.56
8.3.40.0130.00318.79
8.3.30.0040.01118.69
8.3.20.0030.00518.72
8.3.10.0090.00020.76
8.3.00.0080.00019.50
8.2.180.0030.01318.66
8.2.170.0120.00322.96
8.2.160.0070.01018.96
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00320.63
8.2.110.0030.00621.06
8.2.100.0000.01117.84
8.2.90.0030.00619.48
8.2.80.0020.00519.32
8.2.70.0050.01017.38
8.2.60.0050.00317.93
8.2.50.0030.00618.07
8.2.40.0000.00918.16
8.2.30.0000.00918.09
8.2.20.0060.00319.61
8.2.10.0030.00617.98
8.2.00.0040.00417.99
8.1.280.0210.00025.92
8.1.270.0070.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.01122.45
8.1.230.0090.00321.09
8.1.220.0000.00917.79
8.1.210.0090.00018.97
8.1.200.0030.00617.36
8.1.190.0030.00617.51
8.1.180.0000.00818.10
8.1.170.0040.00420.63
8.1.160.0070.00018.87
8.1.150.0000.00818.72
8.1.140.0060.00317.61
8.1.130.0000.00717.84
8.1.120.0040.00417.62
8.1.110.0040.00417.63
8.1.100.0000.00717.62
8.1.90.0040.00417.63
8.1.80.0040.00417.66
8.1.70.0000.00917.63
8.1.60.0080.00317.66
8.1.50.0080.00017.68
8.1.40.0070.00017.57
8.1.30.0090.00017.67
8.1.20.0050.00317.85
8.1.10.0000.00917.74
8.1.00.0040.00417.62
8.0.300.0070.00020.10
8.0.290.0040.00416.88
8.0.280.0000.00718.48
8.0.270.0030.00517.18
8.0.260.0090.00316.86
8.0.250.0000.00717.05
8.0.240.0030.00517.04
8.0.230.0030.00317.06
8.0.220.0050.00317.03
8.0.210.0000.00717.05
8.0.200.0060.00016.95
8.0.190.0000.00717.08
8.0.180.0040.00417.08
8.0.170.0060.00317.02
8.0.160.0040.00417.07
8.0.150.0060.00316.85
8.0.140.0000.00816.83
8.0.130.0030.00313.43
8.0.120.0000.00816.96
8.0.110.0000.00816.90
8.0.100.0030.00517.06
8.0.90.0070.00016.95
8.0.80.0040.01116.97
8.0.70.0040.00417.07
8.0.60.0000.00717.01
8.0.50.0000.00716.93
8.0.30.0090.00917.25
8.0.20.0130.00617.10
8.0.10.0000.00817.15
8.0.00.0130.00616.86
7.4.330.0000.00513.13
7.4.320.0030.00316.84
7.4.300.0000.00616.81
7.4.290.0000.00716.81
7.4.280.0000.00716.82
7.4.270.0080.00016.79
7.4.260.0060.00013.50
7.4.250.0040.00416.82
7.4.240.0030.00316.79
7.4.230.0050.00216.67
7.4.220.0070.01116.83
7.4.210.0070.00716.71
7.4.200.0030.00316.72
7.4.190.0070.00016.73
7.4.160.0070.01316.74
7.4.150.0110.00716.70
7.4.140.0120.01216.66
7.4.130.0030.01416.77
7.4.120.0060.01216.86
7.4.110.0130.00716.56
7.4.100.0060.01616.71
7.4.90.0070.01116.70
7.4.80.0060.01619.39
7.4.70.0070.01316.86
7.4.60.0130.01016.77
7.4.50.0030.00616.63
7.4.40.0060.01016.62
7.4.30.0090.01016.80
7.4.00.0090.00715.30
7.3.330.0040.00413.07
7.3.320.0060.00013.10
7.3.310.0000.00816.20
7.3.300.0070.00016.32
7.3.290.0050.01016.39
7.3.280.0100.00716.30
7.3.270.0090.00916.64
7.3.260.0080.01616.69
7.3.250.0160.00316.37
7.3.240.0080.00816.59
7.3.230.0150.00916.69
7.3.210.0060.01016.54
7.3.200.0090.01216.58
7.3.190.0120.00916.68
7.3.180.0080.00816.68
7.3.170.0060.01216.51
7.3.160.0070.01016.73
7.3.120.0080.00815.11
7.3.110.0050.01114.97
7.3.100.0000.01514.80
7.3.90.0040.01114.84
7.3.80.0060.00315.04
7.3.70.0040.01514.96
7.3.60.0030.00915.05
7.3.50.0060.00614.71
7.3.40.0070.00714.89
7.3.30.0070.00714.93
7.3.20.0030.00916.55
7.3.10.0070.00716.83
7.3.00.0040.01116.76
7.2.330.0070.01016.62
7.2.320.0090.00916.66
7.2.310.0180.00316.70
7.2.300.0060.01216.68
7.2.290.0090.00916.58
7.2.250.0070.01115.32
7.2.240.0060.01315.22
7.2.230.0040.00814.94
7.2.220.0060.00915.28
7.2.210.0060.00915.18
7.2.200.0100.00915.13
7.2.190.0040.01415.23
7.2.180.0110.01114.80
7.2.170.0060.00615.24
7.1.330.0030.01016.11
7.1.320.0040.01116.15
7.1.310.0100.00616.04
7.1.300.0070.00716.10
7.1.290.0030.01715.92
7.1.280.0090.00316.05
7.1.270.0100.00615.69
7.1.260.0030.01115.97
7.1.70.0030.00617.04
7.1.60.0060.00919.31
7.1.50.0120.00617.22
7.1.00.0000.06722.41
7.0.200.0030.00516.52
7.0.140.0000.07722.00
7.0.120.0030.07321.96
7.0.60.0070.07721.79
7.0.50.0070.06717.84
7.0.40.0100.05320.31
7.0.30.0200.04720.33
7.0.20.0270.07320.11
7.0.10.0130.03720.14
7.0.00.0070.04019.98
5.6.280.0000.07720.85
5.6.210.0200.05320.75
5.6.200.0070.08018.18
5.6.190.0100.06320.41
5.6.180.0400.06720.45
5.6.170.0370.07720.62
5.6.160.0100.05320.46
5.6.150.0070.05018.22
5.6.140.0230.04318.18
5.6.130.0070.04018.21
5.6.120.0200.07320.98
5.6.110.0100.08021.13
5.6.100.0070.08320.98
5.6.90.0130.08321.07
5.6.80.0100.05720.50
5.5.350.0130.08320.52
5.5.340.0100.07317.89
5.5.330.0070.07320.42
5.5.320.0230.05320.13
5.5.310.0230.07720.24
5.5.300.0130.03017.98
5.5.290.0100.06717.96
5.5.280.0070.06320.79
5.5.270.0100.08320.86
5.5.260.0070.08320.79
5.5.250.0100.04020.64
5.5.240.0230.04320.28
5.4.450.0170.04319.50
5.4.440.0100.05719.25
5.4.430.0070.06319.39
5.4.420.0030.07019.50
5.4.410.0130.03319.34
5.4.400.0100.07718.79
5.4.390.0000.06319.18
5.4.380.0030.08019.14
5.4.370.0070.07019.12
5.4.360.0070.07019.08
5.4.350.0070.07019.00
5.4.340.0000.08019.20
5.4.320.0100.05719.17
5.4.310.0100.06019.12
5.4.300.0070.06018.78
5.4.290.0070.07318.80
5.4.280.0070.06718.78
5.4.270.0030.04319.07
5.4.260.0030.03719.11
5.4.250.0100.04019.14
5.4.240.0030.04019.07
5.4.230.0130.07019.13
5.4.220.0070.07719.17
5.4.210.0030.05018.99
5.4.200.0030.05318.90
5.4.190.0030.08019.13
5.4.180.0000.08319.16
5.4.170.0070.06018.76
5.4.160.0000.05719.06
5.4.150.0130.07018.98
5.4.140.0100.07316.45
5.4.130.0070.06016.34
5.4.120.0030.05716.19
5.4.110.0130.03316.24
5.4.100.0030.04016.40
5.4.90.0100.07316.15
5.4.80.0070.04016.27
5.4.70.0070.03716.25
5.4.60.0100.06316.37
5.4.50.0000.05316.12
5.4.40.0130.06016.29
5.4.30.0070.06016.22
5.4.20.0070.03716.21
5.4.10.0030.03716.37
5.4.00.0030.05315.89
5.3.290.0100.07714.61
5.3.280.0100.05014.52
5.3.270.0100.06314.56
5.3.260.0130.04014.43
5.3.250.0070.05314.48
5.3.240.0070.04714.54
5.3.230.0070.04014.50
5.3.220.0100.06014.54
5.3.210.0070.04014.36
5.3.200.0000.05014.50
5.3.190.0100.06014.49
5.3.180.0030.07314.36
5.3.170.0070.06014.48
5.3.160.0030.04014.44
5.3.150.0070.06714.50
5.3.140.0030.03714.48
5.3.130.0000.04314.53
5.3.120.0030.05014.52
5.3.110.0030.04314.64
5.3.100.0030.04013.99
5.3.90.0100.07013.82
5.3.80.0070.05714.03
5.3.70.0070.07313.85
5.3.60.0130.03713.94
5.3.50.0070.07313.90
5.3.40.0070.03713.88
5.3.30.0030.06714.00
5.3.20.0030.07313.64
5.3.10.0070.07013.64
5.3.00.0070.06013.75
5.2.170.0070.06311.00
5.2.160.0070.06311.13
5.2.150.0030.06311.12
5.2.140.0030.04311.04
5.2.130.0000.05711.05
5.2.120.0000.04311.05
5.2.110.0100.05711.11
5.2.100.0100.05711.25
5.2.90.0070.06311.09
5.2.80.0100.04710.99
5.2.70.0030.04011.08
5.2.60.0000.07011.13
5.2.50.0130.03310.90
5.2.40.0070.06010.89
5.2.30.0070.03310.80
5.2.20.0000.05310.95
5.2.10.0030.03010.86
5.2.00.0030.04710.61
5.1.60.0030.0509.98
5.1.50.0030.0539.95
5.1.40.0000.02710.02
5.1.30.0030.06010.49
5.1.20.0130.04710.30
5.1.10.0030.06010.08
5.1.00.0130.04010.05
5.0.50.0000.0278.54
5.0.40.0030.0438.48
5.0.30.0070.0378.28
5.0.20.0000.0408.27
5.0.10.0000.0238.25
5.0.00.0000.0308.07
4.4.90.0070.0177.94
4.4.80.0000.0377.94
4.4.70.0000.0177.94
4.4.60.0070.0307.94
4.4.50.0000.0237.94
4.4.40.0070.0307.94
4.4.30.0000.0177.94
4.4.20.0000.0177.94
4.4.10.0070.0277.94
4.4.00.0030.0307.94
4.3.110.0000.0377.94
4.3.100.0030.0337.94
4.3.90.0000.0177.94
4.3.80.0000.0237.94
4.3.70.0000.0177.94
4.3.60.0000.0137.94
4.3.50.0000.0177.94
4.3.40.0000.0277.94
4.3.30.0000.0137.94
4.3.20.0000.0177.94
4.3.10.0000.0177.94
4.3.00.0000.0137.94

preferences:
57.44 ms | 401 KiB | 5 Q