3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "foo (20/50) bar () baz (11/30)"; $pattern = '~\G(?<title>\S+)\h+\((?:(?<number>\d+)/\d+)?\)(?:\s|$)~'; preg_match_all($pattern, $str, $matches, PREG_SET_ORDER, 0); $matches = array_reduce($matches, function($carry, $item) { $carry[] = [ "title" => $item["title"], "number" => array_key_exists("number", $item) ? $item["number"] : 0 ]; return $carry; }); print_r($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.5.10.0110.00716.86
8.5.00.0150.00820.18
8.4.160.0020.00723.95
8.4.150.0090.00317.00
8.4.140.0080.01217.61
8.4.130.0100.01119.61
8.4.120.0130.00620.64
8.4.110.0080.00920.49
8.4.100.0090.00718.71
8.4.90.0090.01020.73
8.4.80.0050.00318.97
8.4.70.0100.01018.88
8.4.60.0080.00018.89
8.4.50.0100.01120.50
8.4.40.0100.01019.76
8.4.30.0060.00320.68
8.4.20.0070.01319.00
8.4.10.0040.00417.76
8.3.280.0010.00114.05
8.3.270.0120.00716.68
8.3.260.0160.00316.70
8.3.250.0090.00919.10
8.3.240.0130.00716.75
8.3.230.0060.00516.84
8.3.220.0120.00618.89
8.3.210.0060.00218.49
8.3.200.0060.00316.73
8.3.190.0110.00817.10
8.3.180.0050.00318.94
8.3.170.0190.00017.29
8.3.160.0120.00618.42
8.3.150.0070.00719.17
8.3.140.0140.00417.28
8.3.130.0050.00318.45
8.3.120.0100.00520.68
8.3.110.0040.00420.94
8.3.100.0000.00824.06
8.3.90.0040.01126.77
8.3.80.0070.00318.43
8.3.70.0150.00316.88
8.3.60.0040.01118.43
8.3.50.0100.00818.61
8.3.40.0100.00718.93
8.3.30.0040.01118.92
8.3.20.0040.00420.86
8.3.10.0080.00023.65
8.3.00.0050.00322.39
8.2.290.0110.00820.74
8.2.280.0080.01118.55
8.2.270.0070.01117.36
8.2.260.0070.00317.04
8.2.250.0060.00318.73
8.2.240.0060.00317.31
8.2.230.0060.00322.58
8.2.220.0040.00437.54
8.2.210.0050.00326.77
8.2.200.0070.00318.79
8.2.190.0110.00417.00
8.2.180.0060.01616.63
8.2.170.0090.00622.96
8.2.160.0030.01020.42
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.73
8.2.110.0090.00022.41
8.2.100.0080.00318.16
8.2.90.0000.00920.54
8.2.80.0080.00017.97
8.2.70.0040.00417.93
8.2.60.0030.00518.22
8.2.50.0040.00418.10
8.2.40.0000.00719.41
8.2.30.0040.00420.58
8.2.20.0070.00018.15
8.2.10.0000.00821.19
8.2.00.0000.00718.18
8.1.330.0090.01022.07
8.1.320.0150.00716.34
8.1.310.0070.01018.66
8.1.300.0090.00018.44
8.1.290.0100.00030.84
8.1.280.0070.01025.92
8.1.270.0040.00422.31
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.76
8.1.230.0090.00321.04
8.1.220.0050.00317.76
8.1.210.0040.00419.16
8.1.200.0030.00617.47
8.1.190.0040.00417.50
8.1.180.0090.00018.10
8.1.170.0000.00918.49
8.1.160.0040.00418.90
8.1.150.0040.00418.86
8.1.140.0020.00519.05
8.1.130.0030.00320.30
8.1.120.0040.00417.66
8.1.110.0000.00717.53
8.1.100.0040.00417.61
8.1.90.0070.00017.56
8.1.80.0000.00817.52
8.1.70.0000.00717.64
8.1.60.0030.00517.70
8.1.50.0000.00817.73
8.1.40.0000.00917.62
8.1.30.0080.00017.86
8.1.20.0080.00017.87
8.1.10.0000.00817.75
8.1.00.0000.00817.69
8.0.300.0040.00419.89
8.0.290.0070.00016.63
8.0.280.0000.00718.40
8.0.270.0040.00417.23
8.0.260.0030.00318.34
8.0.250.0070.00017.06
8.0.240.0030.00317.04
8.0.230.0050.00317.07
8.0.220.0030.00317.03
8.0.210.0000.00716.97
8.0.200.0070.00017.15
8.0.190.0040.00417.07
8.0.180.0070.00017.10
8.0.170.0030.00616.95
8.0.160.0070.00016.99
8.0.150.0060.00616.93
8.0.140.0000.00716.98
8.0.130.0000.00613.49
8.0.120.0040.00417.04
8.0.110.0040.00416.89
8.0.100.0000.00716.91
8.0.90.0040.00417.08
8.0.80.0130.00816.98
8.0.70.0040.00416.90
8.0.60.0050.00217.14
8.0.50.0000.00817.11
8.0.30.0060.01217.23
8.0.20.0060.01217.29
8.0.10.0000.00717.11
8.0.00.0110.00716.80
7.4.330.0020.00215.55
7.4.320.0000.00616.81
7.4.300.0000.00616.83
7.4.290.0030.00316.78
7.4.280.0050.00616.71
7.4.270.0000.00716.83
7.4.260.0000.00716.63
7.4.250.0030.00316.66
7.4.240.0040.00416.66
7.4.230.0070.00016.80
7.4.220.0000.00716.86
7.4.210.0090.00716.79
7.4.200.0030.00316.93
7.4.160.0090.00816.77
7.4.130.0110.00616.68
7.4.120.0140.00816.52
7.4.110.0130.00416.63
7.4.100.0040.01316.76
7.4.90.0060.01016.70
7.4.80.0180.00419.39
7.4.70.0060.01216.68
7.4.60.0080.00816.74
7.4.50.0070.00516.79
7.4.40.0130.00616.79
7.4.00.0120.00415.23
7.3.330.0050.00013.41
7.3.320.0030.00313.29
7.3.310.0030.00316.36
7.3.300.0020.00516.39
7.3.290.0130.00016.36
7.3.280.0100.00716.37
7.3.260.0100.00916.58
7.3.240.0100.01216.63
7.3.230.0070.01016.44
7.3.210.0130.00316.71
7.3.200.0120.00716.55
7.3.190.0100.00716.48
7.3.180.0060.00916.86
7.3.170.0120.00916.79
7.3.160.0100.00616.45
7.3.40.0090.01514.80
7.3.30.0080.00714.88
7.3.20.0030.00916.55
7.3.10.0110.00316.73
7.3.00.0000.01116.81
7.2.330.0060.01516.71
7.2.320.0180.00516.70
7.2.310.0030.01416.76
7.2.300.0100.01016.96
7.2.290.0120.00616.74
7.2.170.0100.01615.07
7.2.160.0200.00315.27
7.2.150.0150.00616.98
7.2.140.0030.01017.06
7.2.130.0120.00016.95
7.2.120.0060.01417.02
7.2.110.0060.01516.74
7.2.100.0090.00616.89
7.2.90.0080.00816.82
7.2.80.0060.01916.86
7.2.70.0070.00717.20
7.2.60.0090.00616.94
7.2.50.0100.00417.11
7.2.40.0130.01017.08
7.2.30.0100.00917.00
7.2.20.0090.00617.04
7.2.10.0070.00716.81
7.2.00.0070.01017.05
7.1.280.0130.00315.70
7.1.270.0030.01215.62
7.1.260.0100.01016.00
7.1.250.0060.00915.86

preferences:
38.42 ms | 403 KiB | 5 Q