3v4l.org

run code in 300+ PHP versions simultaneously
<?php $basename = "a\xFFnything"; print("Before: ".$basename.PHP_EOL); $basename = preg_replace('/[\x00-\x1F]/u', '_', $basename); print("After: ".array_flip(get_defined_constants(true)['pcre'])[preg_last_error()]);

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.00718.56
8.3.50.0110.01118.50
8.3.40.0160.00019.14
8.3.30.0080.00819.03
8.3.20.0080.00021.85
8.3.10.0050.00321.86
8.3.00.0080.00023.70
8.2.180.0150.01225.92
8.2.170.0110.00419.32
8.2.160.0060.01222.96
8.2.150.0070.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0000.00720.08
8.2.110.0030.00619.30
8.2.100.0060.00617.84
8.2.90.0000.00818.21
8.2.80.0090.00017.97
8.2.70.0000.00817.93
8.2.60.0000.00818.16
8.2.50.0030.00518.10
8.2.40.0040.00420.78
8.2.30.0090.00618.56
8.2.20.0070.00618.03
8.2.10.0090.00418.59
8.2.00.0060.00718.45
8.1.280.0090.00625.92
8.1.270.0080.00022.31
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0000.01021.97
8.1.230.0080.00421.16
8.1.220.0000.00817.74
8.1.210.0040.00818.92
8.1.200.0030.01017.61
8.1.190.0080.00017.48
8.1.180.0040.00418.10
8.1.170.0040.00418.89
8.1.160.0110.00118.28
8.1.150.0060.00618.23
8.1.140.0080.00318.30
8.1.130.0070.00618.89
8.1.120.0040.00817.63
8.1.110.0080.00417.60
8.1.100.0080.00517.64
8.1.90.0000.01217.61
8.1.80.0120.00417.62
8.1.70.0040.00817.64
8.1.60.0110.00317.62
8.1.50.0050.00717.66
8.1.40.0020.01017.59
8.1.30.0080.00517.73
8.1.20.0080.00517.80
8.1.10.0060.00717.69
8.1.00.0070.00517.61
8.0.300.0000.00920.02
8.0.290.0100.00016.88
8.0.280.0070.00518.07
8.0.270.0090.00417.45
8.0.260.0100.00218.04
8.0.250.0100.00217.38
8.0.240.0100.00217.40
8.0.230.0070.00517.41
8.0.220.0080.00517.36
8.0.210.0060.00717.34
8.0.200.0060.00617.44
8.0.190.0090.00317.45
8.0.180.0110.00117.34
8.0.170.0110.00317.43
8.0.160.0050.00817.39
8.0.150.0050.00717.30
8.0.140.0110.00217.37
8.0.130.0050.00615.58
8.0.120.0080.00417.38
8.0.110.0080.00317.40
8.0.100.0110.00117.31
8.0.90.0080.00317.33
8.0.80.0130.00617.29
8.0.70.0070.00517.33
8.0.60.0080.00517.39
8.0.50.0070.00417.34
8.0.30.0130.00617.31
8.0.20.0140.00417.46
8.0.10.0090.00317.43
8.0.00.0130.00617.18
7.4.330.0050.00516.57
7.4.320.0060.00517.19
7.4.300.0100.00117.19
7.4.290.0050.00717.19
7.4.280.0080.00417.16
7.4.270.0110.00217.10
7.4.260.0080.00317.06
7.4.250.0110.00117.10
7.4.240.0060.00617.14
7.4.230.0070.00517.19
7.4.220.0110.00117.14
7.4.210.0100.00616.95
7.4.200.0050.00617.24
7.4.190.0120.00317.59
7.4.180.0120.00417.59
7.4.160.0120.00516.92
7.4.150.0090.00617.59
7.4.140.0130.00317.72
7.4.130.0100.00717.17
7.4.120.0110.00517.18
7.4.110.0120.00717.14
7.4.100.0080.00917.06
7.4.90.0130.00517.21
7.4.80.0060.01218.49
7.4.70.0120.00817.13
7.4.60.0160.00217.20
7.4.50.0090.00717.21
7.4.40.0120.00517.17
7.4.30.0140.00017.59
7.4.20.0140.00017.59
7.4.10.0120.00317.59
7.4.00.0060.01115.98
7.3.330.0100.00015.55
7.3.320.0060.00515.53
7.3.310.0120.00217.19
7.3.300.0050.00617.11
7.3.290.0080.00317.12
7.3.280.0120.00316.93
7.3.270.0120.00417.59
7.3.260.0100.00816.79
7.3.250.0070.00717.59
7.3.240.0110.00816.85
7.3.230.0100.00617.09
7.3.220.0130.00317.59
7.3.210.0090.00717.17
7.3.200.0090.00717.17
7.3.190.0090.00617.19
7.3.180.0130.00317.05
7.3.170.0080.00817.21
7.3.160.0040.01217.14
7.3.150.0150.00017.59
7.3.140.0130.00217.59
7.3.130.0110.00417.59
7.3.120.0090.00616.37
7.3.110.0070.00916.38
7.3.100.0030.01216.38
7.3.90.0140.00216.42
7.3.80.0110.00516.37
7.3.70.0070.00616.29
7.3.60.0070.00615.93
7.3.50.0080.00715.92
7.3.40.0110.00315.79
7.3.30.0030.00815.88
7.3.20.0100.00717.29
7.3.10.0090.00417.18
7.3.00.0060.00817.29
7.2.340.0090.00617.59
7.2.330.0120.00417.14
7.2.320.0070.01017.29
7.2.310.0130.00317.30
7.2.300.0100.00717.23
7.2.290.0080.01117.19
7.2.280.0110.00417.59
7.2.270.0130.00317.59
7.2.260.0110.00417.59
7.2.250.0100.00516.55
7.2.240.0110.00716.46
7.2.230.0070.00816.37
7.2.220.0030.01016.48
7.2.210.0050.01116.48
7.2.200.0070.00816.26
7.2.190.0100.00516.06
7.2.180.0060.00515.92
7.2.170.0090.00415.85
7.2.160.0090.00616.37
7.2.150.0080.00717.63
7.2.140.0120.00817.69
7.2.130.0120.00717.59
7.2.120.0100.00517.70
7.2.110.0100.00517.59
7.2.100.0110.00317.56
7.2.90.0110.00417.72
7.2.80.0110.00717.74
7.2.70.0080.00717.52
7.2.60.0060.01017.72
7.2.50.0140.00217.56
7.2.40.0110.00517.57
7.2.30.0100.00917.71
7.2.20.0120.00517.60
7.2.10.0070.00717.71
7.2.00.0070.00717.60
7.1.330.0090.00616.78
7.1.320.0060.00616.91
7.1.310.0110.00216.81
7.1.300.0110.00216.35
7.1.290.0040.00716.38
7.1.280.0050.00816.45
7.1.270.0090.00416.50
7.1.260.0090.00516.50
7.1.250.0070.00916.79
7.1.240.0070.00717.59
7.1.230.0070.00717.59
7.1.220.0140.00017.59
7.1.210.0090.00617.59
7.1.200.0090.00417.59
7.1.190.0140.00017.59
7.1.180.0110.00417.59
7.1.170.0070.00717.59
7.1.160.0070.00717.59
7.1.150.0080.00517.59
7.1.140.0110.00417.59
7.1.130.0110.00417.59
7.1.120.0050.01017.59
7.1.110.0080.00617.59
7.1.100.0100.00317.59
7.1.90.0140.00017.59
7.1.80.0140.00317.59
7.1.70.0150.00017.59
7.1.60.0000.01417.59
7.1.50.0100.00517.59
7.1.40.0170.00017.59
7.1.30.0070.00717.59
7.1.20.0000.01517.59
7.1.10.0080.00617.59
7.1.00.0140.00017.59

preferences:
55.18 ms | 401 KiB | 5 Q