3v4l.org

run code in 300+ PHP versions simultaneously
<?php #$pattern = "#^/([a-z]{2})/([a-zA-Z0-9_-]++)/([a-zA-Z0-9_-]++)(/[^/]+)+/$#"; #$pattern = "#^/([a-z]{2})/([a-zA-Z0-9_-]++)/([a-zA-Z0-9_-]++)/(.*/)?+[/]{0,1}$#"; $pattern = "#^/([a-z]{2})/([a-zA-Z0-9_-]++)/([a-zA-Z0-9_-]++)(/.*+)+$#"; $pattern = "#^/([a-z]{2})/([a-zA-Z0-9_-]++)/([a-zA-Z0-9_-]++)(/.*+)+$#"; $pattern = "#^/([a-z]{2})/([a-zA-Z0-9_-]++)/([a-zA-Z0-9_-]++)/(/[^/]+)+/$#"; #$pattern = "#^/([a-z]{2})/([a-zA-Z0-9_-]++)/([a-zA-Z0-9_-]++)(/.*+)?+[/]{0,1}$#"; $subject = '/en/user/login/foo/bar/'; var_dump(preg_match($pattern, $subject, $matches), $matches); $subject = '/en/user/login'; var_dump(preg_match($pattern, $subject, $matches), $matches);

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.0060.00916.50
8.3.50.0100.01018.10
8.3.40.0080.00818.57
8.3.30.0030.01319.02
8.3.20.0000.00720.16
8.3.10.0080.00023.70
8.3.00.0100.00020.89
8.2.180.0110.00716.88
8.2.170.0150.00622.96
8.2.160.0040.01120.28
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0160.00326.16
8.2.120.0040.00421.11
8.2.110.0050.00522.27
8.2.100.0060.00620.52
8.2.90.0100.00318.99
8.2.80.0050.00317.97
8.2.70.0080.00017.88
8.2.60.0070.00417.67
8.2.50.0030.00618.07
8.2.40.0060.00320.07
8.2.30.0110.00018.30
8.2.20.0040.00417.79
8.2.10.0060.00318.04
8.2.00.0040.00417.77
8.1.270.0040.00423.78
8.1.260.0110.00326.35
8.1.250.0050.00328.09
8.1.240.0000.00922.09
8.1.230.0090.00319.22
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0050.00318.64
8.1.160.0040.00421.95
8.1.150.0030.00618.64
8.1.140.0040.00417.46
8.1.130.0070.00017.86
8.1.120.0000.00717.56
8.1.110.0050.00217.43
8.1.100.0060.00317.54
8.1.90.0050.00317.46
8.1.80.0030.00517.59
8.1.70.0000.00717.50
8.1.60.0000.00917.61
8.1.50.0040.00417.66
8.1.40.0060.00317.63
8.1.30.0100.00017.81
8.1.20.0000.00817.73
8.1.10.0070.00017.54
8.1.00.0000.00817.59
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0030.00318.41
8.0.270.0070.00017.23
8.0.260.0060.00317.10
8.0.250.0080.00017.04
8.0.240.0080.00016.96
8.0.230.0000.00717.02
8.0.220.0000.00716.86
8.0.210.0000.00716.98
8.0.200.0000.00717.07
8.0.190.0030.00517.01
8.0.180.0000.00716.84
8.0.170.0040.00417.02
8.0.160.0040.00417.04
8.0.150.0020.00516.95
8.0.140.0000.00816.94
8.0.130.0000.00513.38
8.0.120.0090.00016.95
8.0.110.0000.00716.93
8.0.100.0070.00016.83
8.0.90.0030.00516.89
8.0.80.0060.00916.98
8.0.70.0000.00816.88
8.0.60.0050.00316.97
8.0.50.0030.00516.86
8.0.30.0070.01117.14
8.0.20.0090.01117.40
8.0.10.0040.00416.99
8.0.00.0080.00916.88
7.4.330.0000.00515.00
7.4.320.0000.00616.58
7.4.300.0000.00616.76
7.4.290.0030.00716.71
7.4.280.0060.00316.61
7.4.270.0000.00716.74
7.4.260.0030.00716.62
7.4.250.0080.00016.72
7.4.240.0040.00316.66
7.4.230.0000.00816.47
7.4.220.0030.02216.71
7.4.210.0090.00616.86
7.4.200.0000.00816.60
7.4.160.0030.01216.59
7.4.150.0060.01517.40
7.4.140.0070.01217.86
7.4.130.0090.00916.83
7.4.120.0040.01516.79
7.4.110.0100.00716.80
7.4.100.0120.00616.69
7.4.90.0070.01016.58
7.4.80.0050.01519.39
7.4.70.0100.00716.49
7.4.60.0160.00616.85
7.4.50.0060.00316.55
7.4.40.0070.01016.43
7.4.30.0040.01216.63
7.4.00.0030.01015.13
7.3.330.0000.00713.27
7.3.320.0000.00513.14
7.3.310.0040.00416.39
7.3.300.0000.00716.31
7.3.290.0040.01116.33
7.3.280.0120.00616.30
7.3.270.0130.00317.40
7.3.260.0170.00716.25
7.3.250.0100.00616.52
7.3.240.0100.00716.29
7.3.230.0140.00416.39
7.3.210.0060.01216.25
7.3.200.0120.00619.39
7.3.190.0090.01516.35
7.3.180.0130.00316.80
7.3.170.0120.00416.50
7.3.160.0030.01616.34
7.3.120.0090.00614.48
7.3.110.0120.00614.66
7.3.100.0030.01015.11
7.3.90.0030.00715.05
7.3.80.0060.00615.02
7.3.70.0000.01414.90
7.3.60.0110.00415.00
7.3.50.0060.00914.66
7.3.40.0090.00614.79
7.3.30.0030.01514.91
7.3.20.0040.01416.76
7.3.10.0060.00916.68
7.3.00.0080.00816.66
7.2.330.0140.00416.38
7.2.320.0030.01416.70
7.2.310.0090.00916.57
7.2.300.0120.00916.60
7.2.290.0100.00816.53
7.2.240.0090.00914.98
7.2.230.0000.01615.05
7.2.220.0140.00415.22
7.2.210.0080.00615.05
7.2.200.0090.00914.91
7.2.190.0070.00714.99
7.2.180.0000.01214.69
7.2.170.0040.00715.21
7.2.160.0000.01115.06
7.2.150.0040.01116.73
7.2.140.0140.00016.79
7.2.130.0030.01317.09
7.2.120.0030.01516.87
7.2.110.0090.00617.08
7.2.100.0060.01016.93
7.2.90.0040.01116.98
7.2.80.0060.00517.05
7.2.70.0140.00016.92
7.2.60.0070.01016.97
7.2.50.0060.00617.04
7.2.40.0070.01016.78
7.2.30.0120.00316.99
7.2.20.0060.00616.62
7.2.10.0110.00616.94
7.2.00.0060.00618.18
7.1.330.0070.01016.05
7.1.320.0070.00716.07
7.1.310.0040.01115.89
7.1.300.0060.00616.04
7.1.290.0060.01015.84
7.1.280.0070.00715.55
7.1.270.0070.00716.01
7.1.260.0080.00815.88
7.1.250.0070.00715.70
7.1.100.0070.00718.02
7.1.70.0050.00317.32
7.1.60.0100.01419.70
7.1.50.0070.01817.04
7.1.00.0030.07722.33
7.0.200.0420.00614.48
7.0.140.0030.07322.18
7.0.60.0270.07019.84
7.0.50.0130.08017.84
7.0.40.0030.07717.75
7.0.30.0030.04317.77
7.0.20.0130.03317.78
7.0.10.0030.08017.71
7.0.00.0000.08317.67
5.6.280.0030.07320.90
5.6.210.0070.04020.55
5.6.200.0100.08718.08
5.6.190.0100.04718.07
5.6.180.0130.07318.06
5.6.170.0000.04718.21
5.6.160.0030.08718.18
5.6.150.0100.06718.08
5.6.140.0030.04018.18
5.6.130.0230.06718.21
5.6.120.0100.03718.15
5.6.110.0100.07718.14
5.6.100.0030.08318.11
5.6.90.0070.04318.20
5.6.80.0030.07317.61
5.6.70.0100.07017.59
5.6.60.0070.07017.59
5.6.50.0070.03717.56
5.6.40.0000.04317.56
5.6.30.0000.08317.45
5.6.20.0100.05017.57
5.6.10.0030.04317.54
5.6.00.0130.07017.52
5.5.350.0030.08020.38
5.5.340.0100.07717.96
5.5.330.0100.07317.92
5.5.320.0000.04717.99
5.5.310.0000.04317.96
5.5.300.0070.05018.02
5.5.290.0130.06718.03
5.5.280.0130.06717.95
5.5.270.0030.05317.91
5.5.260.0070.08717.97
5.5.250.0170.07317.80
5.5.240.0170.07017.29
5.5.230.0100.03317.39
5.5.220.0030.06317.26
5.5.210.0030.04017.38
5.5.200.0070.03717.36
5.5.190.0130.07317.33
5.5.180.0100.06717.27
5.5.160.0170.06717.28
5.5.150.0100.04717.36
5.5.140.0170.03717.36
5.5.130.0130.07017.27
5.5.120.0030.06017.25
5.5.110.0030.08017.26
5.5.100.0130.03317.15
5.5.90.0000.06717.27
5.5.80.0070.04317.20
5.5.70.0070.07317.21
5.5.60.0030.06317.23
5.5.50.0070.05717.21
5.5.40.0030.08017.16
5.5.30.0130.06017.26
5.5.20.0000.07017.26
5.5.10.0030.06717.16
5.5.00.0130.07017.21
5.4.450.0070.04319.36
5.4.440.0100.04719.36
5.4.430.0030.05719.35
5.4.420.0070.06319.35
5.4.410.0030.07719.18
5.4.400.0100.05719.02
5.4.390.0070.07718.99
5.4.380.0100.04319.01
5.4.370.0070.03719.12
5.4.360.0100.04719.07
5.4.350.0000.04018.98
5.4.340.0030.04719.12
5.4.320.0170.04319.01
5.4.310.0130.07019.11
5.4.300.0000.08319.03
5.4.290.0030.05019.00
5.4.280.0100.07318.85
5.4.270.0130.04319.02
5.4.260.0070.06319.11
5.4.250.0030.03719.07
5.4.240.0170.06319.10
5.4.230.0100.05319.20
5.4.220.0100.06718.97
5.4.210.0130.07318.97
5.4.200.0070.07319.07
5.4.190.0030.04718.97
5.4.180.0030.04319.02
5.4.170.0070.07319.04
5.4.160.0070.08019.01
5.4.150.0130.07018.87
5.4.140.0030.07016.18
5.4.130.0130.06316.17
5.4.120.0070.05716.26
5.4.110.0070.07316.37
5.4.100.0030.08016.28
5.4.90.0130.05316.34
5.4.80.0100.06316.37
5.4.70.0100.07016.21
5.4.60.0030.07316.26
5.4.50.0030.06716.25
5.4.40.0030.07316.31
5.4.30.0070.06316.28
5.4.20.0130.06716.40
5.4.10.0030.06716.20
5.4.00.0070.07315.77
5.3.290.0170.06714.63
5.3.280.0070.08014.45
5.3.270.0070.06314.60
5.3.260.0030.07014.38
5.3.250.0100.04714.54
5.3.240.0130.07014.43
5.3.230.0100.07314.56
5.3.220.0130.06714.52
5.3.210.0070.04714.48
5.3.200.0130.07014.55
5.3.190.0000.05014.42
5.3.180.0100.07714.50
5.3.170.0030.08014.55
5.3.160.0000.05014.36
5.3.150.0070.07314.51
5.3.140.0070.07714.41
5.3.130.0070.06014.36
5.3.120.0030.07714.32
5.3.110.0100.07314.51
5.3.100.0070.04313.98
5.3.90.0070.07713.93
5.3.80.0100.07013.79
5.3.70.0070.05713.77
5.3.60.0070.05713.87
5.3.50.0070.05013.71
5.3.40.0030.08013.86
5.3.30.0030.07713.68
5.3.20.0030.05313.63
5.3.10.0000.07313.42
5.3.00.0030.07013.41
5.2.170.0070.06011.14
5.2.160.0130.05310.92
5.2.150.0070.06011.10
5.2.140.0070.05011.17
5.2.130.0070.04010.93
5.2.120.0030.06311.04
5.2.110.0070.05711.05
5.2.100.0000.04010.88
5.2.90.0030.06011.10
5.2.80.0070.06311.02
5.2.70.0100.04711.06
5.2.60.0130.05711.03
5.2.50.0070.05010.85
5.2.40.0000.05310.80
5.2.30.0100.05710.96
5.2.20.0170.04710.94
5.2.10.0070.05010.77
5.2.00.0070.05310.58
5.1.60.0030.0579.96
5.1.50.0030.0279.84
5.1.40.0000.02710.13
5.1.30.0030.02310.29
5.1.20.0000.02710.37
5.1.10.0000.02710.09
5.1.00.0030.03010.00
5.0.50.0030.0238.61
5.0.40.0000.0208.39
5.0.30.0000.0308.28
5.0.20.0030.0178.43
5.0.10.0030.0178.27
5.0.00.0000.0308.27
4.4.90.0070.0338.27
4.4.80.0070.0308.27
4.4.70.0030.0308.27
4.4.60.0000.0408.27
4.4.50.0000.0208.27
4.4.40.0030.0308.27
4.4.30.0030.0178.27
4.4.20.0000.0178.27
4.4.10.0000.0178.27
4.4.00.0030.0238.27
4.3.110.0030.0138.27
4.3.100.0000.0138.27
4.3.90.0000.0138.27
4.3.80.0000.0238.27
4.3.70.0000.0138.27
4.3.60.0070.0108.27
4.3.50.0000.0178.27
4.3.40.0000.0238.27
4.3.30.0000.0138.27
4.3.20.0000.0138.27
4.3.10.0030.0178.27
4.3.00.0000.0138.27

preferences:
51.63 ms | 400 KiB | 5 Q