3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = '/^[А-Я]{1}[0-9]{3}[А-Я]{2}[0-9]{3}$/u'; $pattern = 'Я000ЯЯ000'; $check = function ($str) use ($r, $pattern) { return (bool) preg_match($r, $str . mb_substr($pattern, mb_strlen($str))); }; foreach (['ББ12', 'И7'] as $test) { echo json_encode([$test, $check($test)], JSON_UNESCAPED_UNICODE), PHP_EOL; }

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.4.130.0160.00517.80
8.4.120.0130.00820.43
8.4.110.0070.01318.94
8.4.100.0140.00718.77
8.4.90.0060.00317.94
8.4.80.0040.00419.83
8.4.70.0110.01018.11
8.4.60.0080.01018.57
8.4.50.0040.00418.16
8.4.40.0070.01417.88
8.4.30.0120.00418.54
8.4.20.0180.00418.08
8.4.10.0100.01017.55
8.3.250.0110.00818.57
8.3.240.0070.00716.68
8.3.230.0080.01216.75
8.3.220.0130.00518.54
8.3.210.0100.00616.84
8.3.200.0060.00218.86
8.3.190.0100.01118.76
8.3.180.0120.00719.04
8.3.170.0140.00416.91
8.3.160.0090.01017.21
8.3.150.0120.00618.98
8.3.140.0120.00416.64
8.3.130.0060.00318.79
8.3.120.0070.00420.52
8.3.110.0060.00620.94
8.3.100.0060.00324.06
8.3.90.0000.00826.77
8.3.80.0090.00016.73
8.3.70.0070.01116.63
8.3.60.0180.00416.63
8.3.50.0100.01018.47
8.3.40.0120.00618.93
8.3.30.0120.00318.82
8.3.20.0070.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0110.00720.65
8.2.280.0090.01018.44
8.2.270.0140.00517.17
8.2.260.0000.01118.87
8.2.250.0040.00416.61
8.2.240.0030.00619.07
8.2.230.0070.00022.58
8.2.220.0080.00037.54
8.2.210.0070.00726.77
8.2.200.0030.00716.50
8.2.190.0150.00016.63
8.2.180.0060.00925.92
8.2.170.0120.00319.20
8.2.160.0040.01522.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0060.00320.83
8.2.110.0000.00922.24
8.2.100.0090.00318.09
8.2.90.0040.00418.07
8.2.80.0040.00418.00
8.2.70.0000.01017.88
8.2.60.0070.00417.91
8.2.50.0060.00318.05
8.2.40.0030.00617.97
8.2.30.0070.00018.16
8.2.20.0050.00218.10
8.2.10.0040.00419.41
8.2.00.0040.00419.35
8.1.330.0100.00922.16
8.1.320.0070.00216.45
8.1.310.0120.00216.66
8.1.300.0100.00618.03
8.1.290.0000.01030.84
8.1.280.0000.01825.92
8.1.270.0040.00423.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00622.13
8.1.230.0000.01020.85
8.1.220.0030.00617.74
8.1.210.0030.00519.04
8.1.200.0070.00317.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0050.00318.84
8.1.160.0000.00718.92
8.1.150.0040.00418.84
8.1.140.0030.00518.99
8.1.130.0000.00820.09
8.1.120.0070.00017.52
8.1.110.0040.00417.64
8.1.100.0000.00817.56
8.1.90.0040.00417.54
8.1.80.0040.00417.50
8.1.70.0000.00717.66
8.1.60.0000.00817.80
8.1.50.0080.00017.76
8.1.40.0030.00517.81
8.1.30.0050.00517.88
8.1.20.0050.00317.81
8.1.10.0030.00517.69
8.1.00.0040.00417.71
8.0.300.0000.00720.10
8.0.290.0000.00716.88
8.0.280.0000.00718.45
8.0.270.0070.00018.16
8.0.260.0030.00318.46
8.0.250.0030.00317.29
8.0.240.0030.00317.25
8.0.230.0040.00417.22
8.0.220.0070.00017.07
8.0.210.0030.00317.22
8.0.200.0000.00717.12
8.0.190.0000.00817.25
8.0.180.0030.00517.20
8.0.170.0000.00817.20
8.0.160.0030.00517.06
8.0.150.0060.00317.19
8.0.140.0000.00717.13
8.0.130.0000.00613.67
8.0.120.0040.00417.15
8.0.110.0080.00016.98
8.0.100.0040.00417.14
8.0.90.0000.00717.18
8.0.80.0110.00517.15
8.0.70.0030.00517.19
8.0.60.0000.00717.19
8.0.50.0000.00817.23
8.0.30.0060.00917.16
8.0.20.0030.01317.20
8.0.10.0040.01417.16
8.0.00.0110.00417.14
7.4.330.0000.00615.55
7.4.320.0030.00316.86
7.4.300.0060.00016.80
7.4.290.0030.00316.71
7.4.280.0080.00016.66
7.4.270.0030.00316.65
7.4.260.0050.00013.47
7.4.250.0000.00716.79
7.4.240.0000.00716.61
7.4.230.0000.00716.92
7.4.220.0020.00516.75
7.4.210.0070.00716.80
7.4.200.0000.00716.68
7.4.160.0090.00516.85
7.4.150.0030.01116.90
7.4.140.0080.00816.84
7.4.130.0120.00316.84
7.4.120.0060.00916.86
7.4.110.0120.00416.91
7.4.100.0090.00616.88
7.4.90.0070.01416.89
7.4.80.0160.00316.79
7.4.70.0110.00716.78
7.4.60.0040.01116.75
7.4.50.0070.01016.85
7.4.40.0030.01716.69
7.4.30.0040.01616.79
7.4.20.0110.01016.61
7.4.10.0040.01516.72
7.4.00.0060.00916.68
7.3.330.0040.00416.57
7.3.320.0050.00013.30
7.3.310.0030.00316.55
7.3.300.0000.00716.58
7.3.290.0040.00416.36
7.3.270.0110.00416.53
7.3.260.0040.01716.48
7.3.250.0080.00816.48
7.3.240.0090.00616.51
7.3.230.0080.00816.54
7.3.220.0040.01016.40
7.3.210.0120.00916.33
7.3.200.0000.01816.42
7.3.190.0090.00916.43
7.3.180.0080.00616.41
7.3.170.0110.00316.36
7.3.160.0100.00316.38
7.3.150.0120.00916.37
7.3.140.0100.00316.41
7.3.130.0070.00716.37
7.3.120.0090.01116.37
7.3.110.0130.00616.34
7.3.100.0100.00316.25
7.3.90.0100.01016.70
7.3.80.0100.00316.48
7.3.70.0100.01116.63
7.3.60.0060.01516.64
7.3.50.0110.00816.55
7.3.40.0130.00316.63
7.3.30.0080.00816.57
7.3.20.0100.00716.58
7.3.10.0150.00016.52
7.3.00.0090.00616.53

preferences:
18.78 ms | 403 KiB | 5 Q