3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xa0\xc2"; $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.40.0140.00718.84
8.3.30.0070.00718.94
8.3.20.0040.00420.38
8.3.10.0000.00821.89
8.3.00.0140.00420.73
8.2.170.0140.00022.96
8.2.160.0030.01022.36
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00422.14
8.2.110.0100.01019.45
8.2.100.0090.00317.84
8.2.90.0040.00419.22
8.2.80.0050.00317.97
8.2.70.0000.00817.75
8.2.60.0060.00618.04
8.2.50.0040.00418.07
8.2.40.0000.00718.22
8.2.30.0060.00618.12
8.2.20.0030.00517.80
8.2.10.0070.00017.90
8.2.00.0070.00317.91
8.1.270.0030.00523.83
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00621.21
8.1.230.0030.00919.23
8.1.220.0000.00817.75
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.40
8.1.180.0000.00818.10
8.1.170.0040.00418.62
8.1.160.0000.00722.04
8.1.150.0070.00018.64
8.1.140.0000.00817.54
8.1.130.0000.00717.85
8.1.120.0090.00017.48
8.1.110.0040.00417.56
8.1.100.0000.00817.57
8.1.90.0000.00717.52
8.1.80.0000.00717.56
8.1.70.0000.00717.52
8.1.60.0000.00917.69
8.1.50.0000.00817.61
8.1.40.0000.00817.64
8.1.30.0040.00417.62
8.1.20.0000.00717.71
8.1.10.0040.00417.65
8.1.00.0040.00417.49
8.0.300.0070.00018.77
8.0.290.0070.00017.18
8.0.280.0000.00718.47
8.0.270.0000.00717.32
8.0.260.0030.00316.89
8.0.250.0000.00617.14
8.0.240.0050.00317.06
8.0.230.0070.00017.01
8.0.220.0070.00016.85
8.0.210.0000.00816.89
8.0.200.0030.00316.93
8.0.190.0070.00016.97
8.0.180.0030.00616.91
8.0.170.0030.00517.01
8.0.160.0000.00816.91
8.0.150.0040.00416.98
8.0.140.0050.00216.94
8.0.130.0050.00013.45
8.0.120.0050.00316.94
8.0.110.0030.00516.99
8.0.100.0070.00016.89
8.0.90.0070.00017.09
8.0.80.0060.01017.01
8.0.70.0050.00216.96
8.0.60.0070.00016.78
8.0.50.0040.00416.96
8.0.30.0090.01117.32
8.0.20.0090.01117.47
8.0.10.0000.00816.98
8.0.00.0090.00916.79
7.4.330.0060.00015.00
7.4.320.0000.00616.73
7.4.300.0060.00016.51
7.4.290.0030.00316.75
7.4.280.0070.00016.79
7.4.270.0000.00816.75
7.4.260.0030.00516.68
7.4.250.0070.00016.72
7.4.240.0030.00316.68
7.4.230.0030.00416.73
7.4.220.0190.00616.71
7.4.210.0060.01016.67
7.4.200.0070.00016.59
7.4.190.0040.00416.61
7.4.160.0130.00316.70
7.4.150.0110.00817.40
7.4.140.0110.00817.86
7.4.130.0090.00916.58
7.4.120.0070.01116.64
7.4.110.0120.00416.66
7.4.100.0070.01016.73
7.4.90.0070.01016.53
7.4.80.0310.02816.59
7.4.70.0090.00616.55
7.4.60.0070.01016.52
7.4.50.0000.00516.45
7.4.40.0040.00822.77
7.4.30.0070.01616.67
7.4.00.0030.01015.07
7.3.330.0050.00013.09
7.3.320.0050.00013.05
7.3.310.0020.00516.18
7.3.300.0050.00216.26
7.3.290.0070.00716.40
7.3.280.0120.00516.36
7.3.270.0030.01417.40
7.3.260.0110.01116.31
7.3.250.0160.00516.66
7.3.240.0030.01316.64
7.3.230.0080.00816.56
7.3.210.0060.01016.43
7.3.200.0110.01119.39
7.3.190.0140.00316.35
7.3.180.0130.00316.57
7.3.170.0090.00616.32
7.3.160.0090.00616.39
7.3.120.0100.00714.94
7.2.330.0090.00916.73
7.2.320.0030.01716.67
7.2.310.0080.00816.50
7.2.300.0080.00816.72
7.2.290.0100.00716.61
7.2.60.0060.00917.05
7.2.00.0000.01219.68
7.1.200.0070.00315.66
7.1.100.0310.00217.96
7.1.70.0030.00517.22
7.1.60.0060.01919.32
7.1.50.0070.01417.19
7.1.00.0030.07722.43
7.0.200.0020.00516.56
7.0.140.0000.07721.92
7.0.100.0300.05720.16
7.0.90.0070.06020.02
7.0.80.0070.04719.97
7.0.70.0070.03719.95
7.0.60.0070.04019.90
7.0.50.0130.03720.35
7.0.40.0030.04320.08
7.0.30.0070.04020.07
7.0.20.0030.04320.07
7.0.10.0070.04720.00
7.0.00.0100.05019.99
5.6.280.0070.07021.09
5.6.250.0130.07720.59
5.6.240.0070.05720.61
5.6.230.0100.04020.58
5.6.220.0070.04020.66
5.6.210.0030.04320.55
5.6.200.0000.04321.05
5.6.190.0100.05320.95
5.6.180.0030.03321.03
5.6.170.0100.03321.02
5.6.160.0100.03321.04
5.6.150.0000.04021.02
5.6.140.0030.04021.16
5.6.130.0070.03321.04
5.6.120.0000.04021.03
5.6.110.0070.03320.93
5.6.100.0070.04020.90
5.6.90.0030.04320.98
5.6.80.0030.03720.39
5.6.70.0100.03720.33
5.6.60.0070.03320.44
5.6.50.0030.04020.39
5.6.40.0000.03720.46
5.6.30.0030.03720.29
5.6.20.0100.03320.47
5.6.10.0100.03020.52
5.6.00.0070.03020.47
5.5.380.0070.06320.41
5.5.370.0030.04320.34
5.5.360.0030.04320.33
5.5.350.0070.04020.33
5.5.340.0000.03720.86
5.5.330.0000.04020.63
5.5.320.0000.04020.83
5.5.310.0030.03720.62
5.5.300.0100.03720.85
5.5.290.0030.04320.82
5.5.280.0030.05020.89
5.5.270.0030.04320.63
5.5.260.0070.04320.82
5.5.250.0100.02720.59
5.5.240.0100.02720.31
5.5.230.0200.01720.24
5.5.220.0030.03320.22
5.5.210.0070.03020.18
5.5.200.0070.03020.14
5.5.190.0000.04020.22
5.5.180.0000.04020.27
5.5.160.0030.03720.27
5.5.150.0070.06320.22
5.5.140.0070.04320.18
5.5.130.0100.07020.08
5.5.120.0130.05020.22
5.5.110.0070.03720.23
5.5.100.0100.06720.01
5.5.90.0100.03719.96
5.5.80.0070.07720.10
5.5.70.0070.07020.05
5.5.60.0070.06020.14
5.5.50.0100.06320.04
5.5.40.0070.05320.13
5.5.30.0130.06020.14
5.5.20.0070.08020.04
5.5.10.0030.06020.04
5.5.00.0170.08719.95
5.4.450.0000.03719.38
5.4.440.0030.04019.38
5.4.430.0070.03019.36
5.4.420.0000.04719.38
5.4.410.0030.03719.10
5.4.400.0030.03018.95
5.4.390.0030.03718.81
5.4.380.0000.04719.18
5.4.370.0000.03719.13
5.4.360.0030.03319.11
5.4.350.0070.03318.96
5.4.340.0030.03719.14
5.4.320.0030.08719.03
5.4.310.0000.05718.79
5.4.300.0030.04319.03
5.4.290.0030.07718.96
5.4.280.0070.04719.01
5.4.270.0070.06319.03
5.4.260.0130.03318.78
5.4.250.0100.06019.02
5.4.240.0030.06019.22
5.4.230.0130.05719.04
5.4.220.0100.06319.09
5.4.210.0030.04018.94
5.4.200.0070.06719.11
5.4.190.0130.06319.13
5.4.180.0100.07018.77
5.4.170.0070.08019.05
5.4.160.0100.07319.03
5.4.150.0100.04019.22
5.4.140.0070.07316.34
5.4.130.0030.07716.36
5.4.120.0070.06716.36
5.4.110.0000.04016.40
5.4.100.0070.04316.38
5.4.90.0070.07316.42
5.4.80.0070.06316.40
5.4.70.0030.05716.31
5.4.60.0070.06316.30
5.4.50.0000.06716.29
5.4.40.0070.03316.23
5.4.30.0070.08016.30
5.4.20.0070.05016.39
5.4.10.0100.05716.31
5.4.00.0030.04315.82
5.3.290.0030.06715.74
5.3.280.0030.04315.74
5.3.270.0130.07315.74
5.3.260.0100.06315.74
5.3.250.0070.04315.74
5.3.240.0170.07315.74
5.3.230.0030.07715.74
5.3.220.0100.07015.74
5.3.210.0070.08015.74
5.3.200.0070.06315.74
5.3.190.0070.07315.74
5.3.180.0030.06715.74
5.3.170.0100.05315.74
5.3.160.0000.05015.74
5.3.150.0000.07315.74
5.3.140.0000.04015.74
5.3.130.0000.07715.74
5.3.120.0100.04015.74
5.3.110.0100.05015.74
5.3.100.0070.06715.74
5.3.90.0100.06015.74
5.3.80.0070.04015.74
5.3.70.0070.06015.74
5.3.60.0030.03715.74
5.3.50.0000.07015.74
5.3.40.0100.05315.74
5.3.30.0070.04315.74
5.3.20.0070.03315.74
5.3.10.0070.07315.74
5.3.00.0030.04315.74
5.2.170.0070.04315.74
5.2.160.0000.03315.74
5.2.150.0000.03715.74
5.2.140.0030.03315.74
5.2.130.0070.04015.74
5.2.120.0000.04315.74
5.2.110.0100.02315.74
5.2.100.0030.03315.74
5.2.90.0030.05715.74
5.2.80.0030.05715.74
5.2.70.0100.04315.74
5.2.60.0070.06315.74
5.2.50.0030.06015.74
5.2.40.0070.06015.74
5.2.30.0170.04715.74
5.2.20.0030.04715.74
5.2.10.0070.06015.74
5.2.00.0070.05015.74
5.1.60.0000.05315.74
5.1.50.0030.05015.74
5.1.40.0070.05315.74
5.1.30.0100.04715.74
5.1.20.0100.05315.74
5.1.10.0030.05015.74
5.1.00.0170.02315.74
5.0.50.0000.05015.74
5.0.40.0070.03015.74
5.0.30.0070.06315.74
5.0.20.0030.01715.74
5.0.10.0030.03015.74
5.0.00.0030.06015.74
4.4.90.0000.03715.74
4.4.80.0030.03315.74
4.4.70.0000.02015.74
4.4.60.0030.03315.74
4.4.50.0000.04015.74
4.4.40.0030.03015.74
4.4.30.0000.03715.74
4.4.20.0030.03315.74
4.4.10.0030.03015.74
4.4.00.0000.05715.74
4.3.110.0030.02315.74
4.3.100.0000.01715.74
4.3.90.0070.03315.74
4.3.80.0100.04715.74
4.3.70.0030.03315.74
4.3.60.0030.03315.74
4.3.50.0000.02715.74
4.3.40.0070.03715.74
4.3.30.0000.03715.74
4.3.20.0030.03315.74
4.3.10.0030.02315.74
4.3.00.0030.03315.74

preferences:
44.58 ms | 400 KiB | 5 Q