3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '`\b(?:Sunscreen|Lubricant)\h+[^()]*\((\d+)\h+Quantity\)`'; $str = 'Sunscreen 25g (200 Quantity) Lubricant 100ml (50 Quantity)'; preg_match_all($re, $str, $matches); $result = array_map("intval", $matches[1]); var_dump($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.4.140.0370.01017.48
8.4.130.0040.00720.60
8.4.120.0110.00824.18
8.4.110.0130.00720.96
8.4.100.0100.01018.81
8.4.90.0110.00622.38
8.4.80.0080.00218.62
8.4.70.0040.00418.07
8.4.60.0100.00718.71
8.4.50.0100.01024.01
8.4.40.0130.00318.11
8.4.30.0130.00620.45
8.4.20.0180.00424.47
8.4.10.0100.01024.13
8.3.270.0100.00916.73
8.3.260.0040.00416.79
8.3.250.0110.00818.70
8.3.240.0100.01117.11
8.3.230.0040.00416.87
8.3.220.0070.00918.80
8.3.210.0080.00818.65
8.3.200.0060.00316.69
8.3.190.0060.00217.18
8.3.180.0120.00718.35
8.3.170.0020.00516.61
8.3.160.0110.00818.61
8.3.150.0130.00617.25
8.3.140.0060.00317.26
8.3.130.0060.00316.84
8.3.120.0110.00020.50
8.3.110.0080.00020.94
8.3.100.0000.00924.06
8.3.90.0030.00626.77
8.3.80.0030.00719.36
8.3.70.0040.01516.58
8.3.60.0080.00816.88
8.3.50.0140.00724.40
8.3.40.0210.00018.96
8.3.30.0110.00418.83
8.3.20.0030.00624.18
8.3.10.0040.00424.66
8.3.00.0000.00726.16
8.2.290.0090.01120.24
8.2.280.0060.00418.33
8.2.270.0160.00317.03
8.2.260.0110.00719.05
8.2.250.0030.01317.08
8.2.240.0080.00017.31
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0080.00026.77
8.2.200.0040.00818.88
8.2.190.0090.00616.88
8.2.180.0060.00925.92
8.2.170.0040.01118.99
8.2.160.0090.00622.96
8.2.150.0080.00025.66
8.2.140.0030.00724.66
8.2.130.0040.00426.16
8.2.120.0080.00021.13
8.2.110.0000.00922.20
8.2.100.0090.00317.68
8.2.90.0060.00317.91
8.2.80.0040.00419.11
8.2.70.0030.00618.05
8.2.60.0060.00617.97
8.2.50.0050.00318.10
8.2.40.0050.00319.34
8.2.30.0030.00619.16
8.2.20.0040.00418.08
8.2.10.0040.00419.29
8.2.00.0040.00419.16
8.1.330.0110.00721.80
8.1.320.0120.00716.23
8.1.310.0060.00918.59
8.1.300.0060.00318.43
8.1.290.0080.00030.84
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00423.97
8.1.230.0110.00020.89
8.1.220.0000.00817.75
8.1.210.0000.00818.78
8.1.200.0040.00417.35
8.1.190.0050.00517.47
8.1.180.0060.00318.10
8.1.170.0080.00018.63
8.1.160.0070.00419.03
8.1.150.0030.00718.91
8.1.140.0000.00718.77
8.1.130.0040.00417.55
8.1.120.0030.00617.55
8.1.110.0050.00517.44
8.1.100.0000.00717.60
8.1.90.0020.00517.47
8.1.80.0030.00517.57
8.1.70.0000.00717.45
8.1.60.0060.00317.71
8.1.50.0040.00417.61
8.1.40.0000.00717.60
8.1.30.0060.00317.57
8.1.20.0050.00217.57
8.1.10.0040.00417.71
8.1.00.0040.00417.66
8.0.300.0070.00020.04
8.0.290.0030.00716.88
8.0.280.0000.00718.36
8.0.270.0000.00716.98
8.0.260.0000.00616.79
8.0.250.0050.00316.93
8.0.240.0000.00717.01
8.0.230.0000.00717.00
8.0.220.0030.00316.88
8.0.210.0030.00316.98
8.0.200.0020.00517.04
8.0.190.0040.00416.95
8.0.180.0000.00717.03
8.0.170.0030.00617.01
8.0.160.0040.00417.03
8.0.150.0040.00416.91
8.0.140.0070.00016.83
8.0.130.0060.00013.40
8.0.120.0040.00416.90
8.0.110.0000.00716.85
8.0.100.0070.00016.87
8.0.90.0070.00017.05
8.0.80.0090.00916.95
8.0.70.0000.00816.94
8.0.60.0000.00716.85
8.0.50.0030.00516.85
8.0.30.0110.01416.93
8.0.20.0110.00817.43
8.0.10.0030.00416.93
8.0.00.0060.01917.05
7.4.330.0020.00215.55
7.4.320.0030.00316.67
7.4.300.0040.00416.67
7.4.290.0070.00016.71
7.4.280.0070.00016.76
7.4.270.0070.00016.66
7.4.260.0000.00716.64
7.4.250.0000.00716.62
7.4.240.0000.00716.82
7.4.230.0030.00316.87
7.4.220.0030.00316.69
7.4.210.0080.00716.69
7.4.200.0000.00716.82
7.4.130.0080.01016.65
7.4.120.0120.01416.79
7.4.110.0120.00916.57
7.4.100.0100.01316.79
7.4.90.0100.00616.48
7.4.80.0070.01016.41
7.4.70.0130.00416.45
7.4.60.0060.01516.48
7.4.50.0060.01216.44
7.4.40.0110.00716.55
7.4.30.0100.00716.36
7.4.20.0140.00616.45
7.4.10.0150.00316.70
7.4.00.0090.00916.71
7.3.330.0070.00016.41
7.3.320.0000.00613.27
7.3.310.0030.00316.32
7.3.300.0040.00416.41
7.3.290.0050.01316.36
7.3.280.0100.00616.40
7.3.260.0070.01416.44
7.3.230.0070.01016.74
7.3.210.0090.00916.36
7.3.200.0050.01616.60
7.3.190.0080.00816.34
7.3.180.0130.00916.60
7.3.170.0090.00916.27
7.3.160.0120.00616.42
7.3.150.0120.00616.44
7.3.140.0100.00716.54
7.3.130.0090.00816.39
7.3.120.0090.00616.45
7.3.110.0090.00616.13
7.3.100.0130.00316.19
7.3.90.0160.00016.63
7.3.80.0090.00916.37
7.3.70.0100.00616.44
7.3.60.0120.00616.32
7.3.50.0120.00616.35
7.3.40.0100.00716.36
7.3.30.0030.01316.49
7.3.20.0110.00616.34
7.3.10.0180.00316.28
7.3.00.0170.00016.30
7.2.330.0130.00416.63
7.2.320.0070.01116.46
7.2.310.0090.00916.73
7.2.300.0170.00616.69
7.2.290.0090.00916.64
7.2.280.0140.00716.70
7.2.270.0100.01016.72
7.2.260.0130.00516.67
7.2.250.0050.01316.74
7.2.240.0060.01216.53
7.2.230.0090.00916.77
7.2.220.0130.00416.48
7.2.210.0070.01016.45
7.2.200.0140.00716.64
7.2.190.0060.01216.79
7.2.180.0100.01416.46
7.2.170.0060.01416.38
7.2.160.0130.00316.73
7.2.150.0060.01216.52
7.2.140.0090.00916.53
7.2.130.0200.00016.74
7.2.120.0150.00816.58
7.2.110.0130.01016.50
7.2.100.0070.01016.76
7.2.90.0150.00616.83
7.2.80.0180.00416.79
7.2.70.0120.00616.78
7.2.60.0070.01116.53
7.2.50.0100.00916.69
7.2.40.0030.01416.69
7.2.30.0070.01016.65
7.2.20.0120.00616.68
7.2.10.0030.01516.87
7.2.00.0070.01416.58

preferences:
114.09 ms | 403 KiB | 5 Q