3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\x7F\xc2"; $result = preg_replace('~[\x{0000}-\x{001F}\x{007F}-\x{00a0}]~S', '', $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.60.0150.00616.63
8.3.50.0070.00917.48
8.3.40.0130.00318.83
8.3.30.0090.00619.02
8.3.20.0080.00018.90
8.3.10.0040.00420.73
8.3.00.0160.00319.51
8.2.180.0140.00416.88
8.2.170.0060.00922.96
8.2.160.0120.00320.87
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0090.00018.89
8.2.110.0030.00620.38
8.2.100.0140.00017.78
8.2.90.0050.00519.07
8.2.80.0050.00317.97
8.2.70.0030.00717.75
8.2.60.0040.00418.05
8.2.50.0000.00818.10
8.2.40.0040.00420.46
8.2.30.0080.00018.07
8.2.20.0040.00419.61
8.2.10.0040.00417.96
8.2.00.0040.00417.88
8.1.280.0090.00925.92
8.1.270.0050.00323.99
8.1.260.0030.00526.35
8.1.250.0000.00728.09
8.1.240.0000.00922.62
8.1.230.0090.00317.70
8.1.220.0040.00417.75
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.36
8.1.180.0050.00318.10
8.1.170.0040.00418.68
8.1.160.0000.00722.13
8.1.150.0000.00818.76
8.1.140.0040.00417.55
8.1.130.0030.00317.89
8.1.120.0000.00717.52
8.1.110.0000.00717.55
8.1.100.0050.00217.54
8.1.90.0000.00717.45
8.1.80.0030.00517.53
8.1.70.0050.00217.44
8.1.60.0000.00817.63
8.1.50.0030.00617.54
8.1.40.0040.00417.44
8.1.30.0030.00517.75
8.1.20.0000.00717.73
8.1.10.0000.00817.52
8.1.00.0040.00417.65
8.0.300.0070.00018.77
8.0.290.0050.00316.58
8.0.280.0040.00418.37
8.0.270.0040.00417.19
8.0.260.0030.00317.00
8.0.250.0040.00417.10
8.0.240.0040.00417.06
8.0.230.0000.00717.03
8.0.220.0030.00316.93
8.0.210.0040.00416.97
8.0.200.0080.00016.94
8.0.190.0000.00716.91
8.0.180.0000.00716.97
8.0.170.0060.00316.87
8.0.160.0040.00417.05
8.0.150.0060.00317.00
8.0.140.0070.00016.83
8.0.130.0000.00613.37
8.0.120.0000.00716.87
8.0.110.0030.00616.97
8.0.100.0040.00317.01
8.0.90.0030.00516.84
8.0.80.0060.01017.02
8.0.70.0000.00816.93
8.0.60.0020.00516.76
8.0.50.0070.00017.00
8.0.30.0110.00717.02
8.0.20.0050.01417.36
8.0.10.0030.00517.05
8.0.00.0080.01416.90
7.4.330.0030.00313.07
7.4.320.0060.00016.68
7.4.300.0000.00616.71
7.4.290.0000.00716.75
7.4.280.0000.00816.61
7.4.270.0000.00616.67
7.4.260.0030.00313.38
7.4.250.0060.00316.77
7.4.240.0030.00316.74
7.4.230.0070.00016.83
7.4.220.0160.00416.70
7.4.210.0100.00316.65
7.4.200.0040.00416.84
7.4.190.0030.00516.90
7.4.160.0090.00616.70
7.4.150.0130.00316.55
7.4.140.0140.00316.75
7.4.130.0110.00716.77
7.4.120.0070.01016.68
7.4.110.0120.00916.41
7.4.100.0090.00916.53
7.4.90.0140.00716.68
7.4.80.0110.00716.79
7.4.70.0130.00316.71
7.4.60.0100.00716.49
7.4.50.0030.00516.65
7.4.40.0070.01016.43
7.4.30.0100.00716.69
7.4.10.0070.01214.89
7.4.00.0080.00715.02
7.3.330.0060.00013.10
7.3.320.0050.00013.25
7.3.310.0030.00316.21
7.3.300.0070.00016.33
7.3.290.0080.00716.37
7.3.280.0130.00616.34
7.3.270.0090.00916.37
7.3.260.0110.00716.34
7.3.250.0110.00716.52
7.3.240.0100.00616.60
7.3.230.0000.01616.52
7.3.210.0140.00316.34
7.3.200.0120.00619.39
7.3.190.0080.00816.41
7.3.180.0060.00916.58
7.3.170.0060.01516.45
7.3.160.0030.01316.40
7.3.130.0080.01114.51
7.3.120.0050.01214.94
7.3.110.0070.01014.93
7.3.100.0090.00614.80
7.3.90.0060.01214.76
7.3.80.0090.00514.93
7.3.70.0090.00514.72
7.3.60.0090.00614.67
7.3.50.0100.00714.75
7.3.40.0090.00914.60
7.3.30.0100.00814.76
7.3.20.0050.01016.04
7.3.10.0080.00715.87
7.3.00.0110.00515.93
7.2.330.0030.01616.75
7.2.320.0130.00416.48
7.2.310.0100.01316.57
7.2.300.0030.01416.88
7.2.290.0080.00816.85
7.2.260.0070.01114.97
7.2.250.0050.01415.05
7.2.240.0120.00615.22
7.2.230.0040.01215.07
7.2.220.0110.00815.11
7.2.210.0090.00614.91
7.2.200.0070.00914.88
7.2.190.0090.00914.96
7.2.180.0070.01114.98
7.2.170.0090.00715.06
7.2.160.0090.00914.79
7.2.150.0100.00915.76
7.2.140.0080.01015.92
7.2.130.0070.00815.87
7.2.120.0110.00715.86
7.2.110.0080.01216.08
7.2.100.0150.01315.96
7.2.90.0080.01015.86
7.2.80.0090.01316.07
7.2.70.0110.00515.59
7.2.60.0110.00915.88
7.2.50.0070.01715.91
7.2.40.0150.00715.87
7.2.30.0170.00716.03
7.2.20.0060.01215.89
7.2.10.0100.01215.80
7.2.00.0080.00817.06
7.1.330.0100.00615.30
7.1.320.0040.01015.36
7.1.310.0080.00915.30
7.1.300.0120.00615.23
7.1.290.0080.00815.19
7.1.280.0110.00415.07
7.1.270.0080.00715.26
7.1.260.0080.01115.23
7.1.250.0110.00614.98
7.1.240.0120.00514.85
7.1.230.0140.00514.89
7.1.220.0170.00514.96
7.1.210.0130.00214.66
7.1.200.0100.00714.92
7.1.190.0070.00914.94
7.1.180.0080.01315.02
7.1.170.0080.00814.79
7.1.160.0150.00615.01
7.1.150.0110.01114.86
7.1.140.0080.01214.91
7.1.130.0090.01514.79
7.1.120.0100.00814.87
7.1.110.0120.00714.75
7.1.100.0080.00816.08
7.1.90.0060.01214.94
7.1.80.0110.00514.82
7.1.70.0020.01215.57
7.1.60.0070.00716.41
7.1.50.0080.01215.57
7.1.40.0140.00514.86
7.1.30.0110.00614.76
7.1.20.0110.00514.99
7.1.10.0060.01114.94
7.1.00.0160.03117.44
7.0.330.0100.00714.60
7.0.320.0090.00714.51
7.0.310.0120.00614.62
7.0.300.0100.00914.29
7.0.290.0160.00414.44
7.0.280.0160.00314.43
7.0.270.0180.00914.66
7.0.260.0120.00614.63
7.0.250.0140.00314.67
7.0.240.0050.01014.57
7.0.230.0070.00714.63
7.0.220.0110.00414.52
7.0.210.0110.00714.44
7.0.200.0180.00714.79
7.0.190.0090.01114.47
7.0.180.0070.00814.79
7.0.170.0110.00714.67
7.0.160.0130.00314.58
7.0.150.0160.00114.80
7.0.140.0070.03016.97
7.0.130.0060.01114.67
7.0.120.0090.02817.09
7.0.110.0060.00714.61
7.0.100.0070.00814.38
7.0.90.0050.00914.62
7.0.80.0090.00714.55
7.0.70.0120.00514.47
7.0.60.0100.01816.97
7.0.50.0070.01815.67
7.0.40.0160.02915.89
7.0.30.0220.02115.74
7.0.20.0190.02915.78
7.0.10.0070.02615.81
7.0.00.0150.02815.70
5.6.400.0090.00614.18
5.6.390.0090.01014.28
5.6.380.0100.00614.15
5.6.370.0130.00514.55
5.6.360.0070.01114.45
5.6.350.0080.01314.17
5.6.340.0120.00514.22
5.6.330.0100.00813.94
5.6.320.0090.00914.34
5.6.310.0100.00914.23
5.6.300.0130.00814.28
5.6.290.0120.00514.09
5.6.280.0090.00814.37
5.6.270.0110.00714.24
5.6.260.0100.00514.43
5.6.250.0080.00514.23
5.6.240.0060.00814.27
5.6.230.0130.00514.35
5.6.220.0080.00914.32
5.6.210.0110.03116.42
5.6.200.0110.02215.62
5.6.190.0070.03316.26
5.6.180.1140.01816.29
5.6.170.0210.02716.39
5.6.160.0120.03016.21
5.6.150.0080.03315.66
5.6.140.0110.03015.45
5.6.130.0080.03015.47
5.6.120.0090.02216.57
5.6.110.0100.03216.55
5.6.100.0060.03016.39
5.6.90.0070.03716.31
5.6.80.0100.01816.29
5.6.70.0080.01214.15
5.6.60.0070.01414.21
5.6.50.0080.01014.34
5.6.40.0180.01114.13
5.6.30.0090.00814.06
5.6.20.0090.00714.16
5.6.10.0130.00214.13
5.6.00.0080.00814.16
5.5.380.0070.00814.21
5.5.370.0080.01114.20
5.5.360.0080.00814.05
5.5.350.0180.02416.27
5.5.340.0060.03215.46
5.5.330.0060.02916.31
5.5.320.0210.01716.23
5.5.310.0190.02416.14
5.5.300.0080.01515.28
5.5.290.0100.01715.28
5.5.280.0090.03216.42
5.5.270.0130.03316.43
5.5.260.0080.03416.50
5.5.250.0070.03516.38
5.5.240.0160.01816.24
5.5.230.0110.00814.09
5.5.220.0080.00914.17
5.5.210.0060.01114.26
5.5.200.0080.00914.13
5.5.190.0100.01014.06
5.5.180.0100.00814.03
5.5.170.0040.01214.14
5.5.160.0110.00914.00
5.5.150.0190.00914.14
5.5.140.0070.01013.98
5.5.130.0080.01214.09
5.5.120.0120.01014.02
5.5.110.0120.00614.12
5.5.100.0130.00714.06
5.5.90.0130.00713.91
5.5.80.0050.01213.92
5.5.70.0070.01213.96
5.5.60.0130.00513.95
5.5.50.0090.00814.00
5.5.40.0120.00613.97
5.5.30.0110.00614.13
5.5.20.0070.01113.99
5.5.10.0120.00614.01
5.5.00.0070.00714.10
5.4.450.0040.03114.33
5.4.440.0070.03114.29
5.4.430.0050.02014.36
5.4.420.0080.02714.29
5.4.410.0070.03114.38
5.4.400.0050.01814.09
5.4.390.0030.02014.26
5.4.380.0070.01814.25
5.4.370.0060.01814.26
5.4.360.0070.02914.16
5.4.350.0070.02414.19
5.4.340.0090.01714.19
5.4.330.0040.00911.90
5.4.320.0080.01614.25
5.4.310.0050.01814.21
5.4.300.0060.02914.31
5.4.290.0080.02214.18
5.4.280.0070.03014.15
5.4.270.0060.03114.16
5.4.260.0120.01414.16
5.4.250.0080.01814.22
5.4.240.0080.02114.23
5.4.230.0080.02814.17
5.4.220.0120.01614.19
5.4.210.0070.02014.07
5.4.200.0070.03014.33
5.4.190.0050.02314.36
5.4.180.0090.03114.25
5.4.170.0100.02614.25
5.4.160.0030.02114.18
5.4.150.0070.02914.06
5.4.140.0040.01813.30
5.4.130.0100.02613.27
5.4.120.0080.02013.35
5.4.110.0070.03113.29
5.4.100.0070.03113.24
5.4.90.0060.01913.44
5.4.80.0060.03213.32
5.4.70.0060.02213.33
5.4.60.0070.02313.34
5.4.50.0050.02613.31
5.4.40.0040.02113.27
5.4.30.0060.01613.29
5.4.20.0070.01913.29
5.4.10.0080.03113.33
5.4.00.0100.02513.14
5.3.290.0100.02212.62
5.3.280.0050.03312.54
5.3.270.0060.02212.53
5.3.260.0090.02112.55
5.3.250.0110.02312.53
5.3.240.0100.01712.49
5.3.230.0030.01912.55
5.3.220.0080.02412.50
5.3.210.0100.02512.51
5.3.200.0100.02212.48
5.3.190.0090.02512.54
5.3.180.0030.02412.51
5.3.170.0030.03112.60
5.3.160.0050.02112.53
5.3.150.0080.02112.59
5.3.140.0090.02712.50
5.3.130.0060.01712.56
5.3.120.0080.02212.53
5.3.110.0040.01912.56
5.3.100.0100.02512.40
5.3.90.0090.01512.40
5.3.80.0060.02012.28
5.3.70.0080.02812.34
5.3.60.0080.01912.45
5.3.50.0070.01912.26
5.3.40.0080.03112.22
5.3.30.0050.03112.29
5.3.20.0100.02512.20
5.3.10.0060.02812.11
5.3.00.0070.02712.10
5.2.170.0080.03011.96
5.2.160.0080.03211.90
5.2.150.0050.02211.85
5.2.140.0070.01711.92
5.2.130.0020.02511.85
5.2.120.0090.02211.89
5.2.110.0050.02411.84
5.2.100.0160.02811.90
5.2.90.0090.01811.88
5.2.80.0030.02811.88
5.2.70.0070.02711.84
5.2.60.0050.01911.85
5.2.50.0050.01811.85
5.2.40.0080.02811.76
5.2.30.0110.02411.80
5.2.20.0080.02111.75
5.2.10.0060.02311.78
5.2.00.0020.02511.65
5.1.60.0040.01711.32
5.1.50.0060.02611.37
5.1.40.0100.02311.34
5.1.30.0030.02711.56
5.1.20.0050.02011.52
5.1.10.0060.02211.41
5.1.00.0080.01711.42
5.0.50.0060.02310.66
5.0.40.0030.01210.47
5.0.30.0030.03610.45
5.0.20.0020.02610.46
5.0.10.0060.02210.43
5.0.00.0070.02910.43
4.4.90.0030.00810.23
4.4.80.0020.02210.23
4.4.70.0010.02010.23
4.4.60.0030.01710.23
4.4.50.0030.01510.23
4.4.40.0000.02710.23
4.4.30.0050.01210.23
4.4.20.0020.02210.23
4.4.10.0030.01110.23
4.4.00.0030.01510.23
4.3.110.0030.00810.23
4.3.100.0020.02210.23
4.3.90.0050.01110.23
4.3.80.0050.01810.23
4.3.70.0020.01210.23
4.3.60.0020.01310.23
4.3.50.0080.01710.23
4.3.40.0040.03010.23
4.3.30.0010.01310.23
4.3.20.0020.01910.23
4.3.10.0040.01810.23
4.3.00.0000.02110.23

preferences:
57.37 ms | 401 KiB | 5 Q