3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(?:[0-9]+g|A handful).*?(?=\s*(?:[0-9]+g|A handful|$))/m'; $str = '35g walnut halves A handful of thyme leaves 200g portobello mushrooms 200g white mushrooms 200g chifferini pasta 100g Petit Brebis sheep\'s cheese 40g honey'; if (preg_match_all($re, $str, $matches)) { print_r($matches[0]); }

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.00.0130.01119.83
8.4.150.0010.00114.05
8.4.140.0110.01117.95
8.4.130.0100.00518.06
8.4.120.0100.00820.41
8.4.110.0050.00422.71
8.4.100.0140.00817.78
8.4.90.0050.00417.98
8.4.80.0120.00817.95
8.4.70.0110.01019.59
8.4.60.0120.00918.80
8.4.50.0100.01120.71
8.4.40.0080.00418.02
8.4.30.0160.01020.20
8.4.20.0000.02117.96
8.4.10.0060.00319.48
8.3.280.0130.00818.64
8.3.270.0100.00916.74
8.3.260.0120.00816.69
8.3.250.0120.00718.83
8.3.240.0080.00816.70
8.3.230.0090.01116.63
8.3.220.0140.00417.20
8.3.210.0130.00616.60
8.3.200.0060.00516.46
8.3.190.0090.00717.22
8.3.180.0110.00916.49
8.3.170.0120.00618.96
8.3.160.0090.00917.26
8.3.150.0090.00917.21
8.3.140.0000.00818.89
8.3.130.0070.00418.46
8.3.120.0110.00418.81
8.3.110.0110.00020.94
8.3.100.0130.00724.06
8.3.90.0150.00426.77
8.3.80.0030.00616.63
8.3.70.0110.00816.75
8.3.60.0090.00616.63
8.3.50.0210.00623.73
8.3.40.0100.00721.86
8.3.30.0040.01218.85
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0090.00920.58
8.2.280.0080.00618.68
8.2.270.0060.01318.77
8.2.260.0060.00318.52
8.2.250.0060.00316.93
8.2.240.0080.00017.07
8.2.230.0080.00022.58
8.2.220.0030.00737.54
8.2.210.0130.00626.77
8.2.200.0060.00316.75
8.2.190.0100.00517.00
8.2.180.0110.00425.92
8.2.170.0100.00319.21
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00926.16
8.2.120.0080.00026.35
8.2.110.0070.00322.38
8.2.100.0120.00017.84
8.2.90.0000.00818.03
8.2.80.0060.00318.04
8.2.70.0000.00818.04
8.2.60.0040.00418.22
8.2.50.0000.00818.10
8.2.40.0050.00319.23
8.2.30.0050.00219.16
8.2.20.0040.00417.97
8.2.10.0040.00419.21
8.2.00.0000.00719.09
8.1.330.0080.01118.36
8.1.320.0070.01216.26
8.1.310.0090.00918.60
8.1.300.0030.00618.27
8.1.290.0100.00018.88
8.1.280.0170.00025.92
8.1.270.0030.00623.99
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0060.00617.48
8.1.230.0120.00020.87
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0040.00417.22
8.1.190.0060.00317.25
8.1.180.0050.00318.10
8.1.170.0060.00318.75
8.1.160.0080.00018.99
8.1.150.0040.00418.86
8.1.140.0040.00418.74
8.1.130.0030.00320.29
8.1.120.0000.00717.47
8.1.110.0030.00517.52
8.1.100.0040.00417.61
8.1.90.0030.00517.60
8.1.80.0030.00717.53
8.1.70.0080.00317.54
8.1.60.0040.00417.73
8.1.50.0040.00417.58
8.1.40.0030.00617.50
8.1.30.0030.00617.64
8.1.20.0000.00817.58
8.1.10.0060.00317.73
8.1.00.0080.00317.55
8.0.300.0000.00719.84
8.0.290.0090.00316.75
8.0.280.0030.00318.44
8.0.270.0030.00316.84
8.0.260.0000.00620.23
8.0.250.0000.00717.04
8.0.240.0040.00417.07
8.0.230.0000.00817.04
8.0.220.0070.00016.89
8.0.210.0030.00317.01
8.0.200.0070.00017.02
8.0.190.0040.00417.05
8.0.180.0050.00217.02
8.0.170.0080.00016.97
8.0.160.0000.00916.96
8.0.150.0060.00316.82
8.0.140.0000.00816.88
8.0.130.0060.00013.39
8.0.120.0040.00416.96
8.0.110.0020.00517.05
8.0.100.0080.00017.05
8.0.90.0070.00016.98
8.0.80.0070.01117.04
8.0.70.0080.00016.99
8.0.60.0080.00017.01
8.0.50.0040.00417.04
8.0.30.0040.01517.43
8.0.20.0120.00817.12
8.0.10.0040.00416.99
8.0.00.0090.00916.97
7.4.330.0030.00315.55
7.4.320.0000.00616.65
7.4.300.0060.00316.78
7.4.290.0040.00416.46
7.4.280.0070.00416.75
7.4.270.0000.00716.66
7.4.260.0000.00613.48
7.4.250.0080.00016.74
7.4.240.0000.00716.79
7.4.230.0030.00316.59
7.4.220.0000.00716.72
7.4.210.0070.00816.72
7.4.200.0000.00716.86
7.4.130.0100.01016.66
7.4.120.0000.01916.46
7.4.110.0110.01216.54
7.4.100.0150.00616.65
7.4.90.0080.01716.63
7.4.80.0110.00816.84
7.4.70.0070.01416.54
7.4.60.0050.01616.68
7.4.50.0060.01416.76
7.4.40.0100.01016.59
7.4.30.0040.01916.49
7.4.20.0180.00716.67
7.4.10.0150.00916.41
7.4.00.0030.01416.79
7.3.330.0040.00416.28
7.3.320.0000.00613.28
7.3.310.0030.00316.29
7.3.300.0040.00416.27
7.3.290.0090.01016.40
7.3.260.0070.01116.75
7.3.240.0180.00416.38
7.3.230.0160.00416.39
7.3.220.0130.00916.46
7.3.210.0120.00916.53
7.3.200.0130.00916.54
7.3.190.0090.01216.37
7.3.180.0070.01116.66
7.3.170.0120.00616.57
7.3.160.0130.01016.72
7.3.150.0130.01016.34
7.3.140.0130.00616.54
7.3.130.0060.01216.73
7.3.120.0180.00316.69
7.3.110.0150.00516.79
7.3.100.0220.00016.35
7.3.90.0090.01516.68
7.3.80.0160.00616.66
7.3.70.0060.01116.34
7.3.60.0110.00716.40
7.3.50.0160.00616.44
7.3.40.0110.01116.31
7.3.30.0090.01216.46
7.3.20.0230.00816.52
7.3.10.0130.00616.55
7.3.00.0190.00616.46
7.2.340.0130.00816.79
7.2.330.0090.01516.64
7.2.320.0090.00916.60
7.2.310.0110.00816.62
7.2.300.0140.00716.58
7.2.290.0120.01216.62
7.2.280.0070.01716.83
7.2.270.0060.01316.71
7.2.260.0060.01216.59
7.2.250.0110.00816.66
7.2.240.0130.01016.61
7.2.230.0080.01416.52
7.2.220.0190.00516.61
7.2.210.0120.01216.65
7.2.200.0120.00616.71
7.2.190.0190.00616.57
7.2.180.0140.01016.67
7.2.170.0140.01016.52
7.2.160.0120.00916.52
7.2.150.0110.01116.71
7.2.140.0060.01316.75
7.2.130.0120.00616.63
7.2.120.0100.00716.62
7.2.110.0070.01116.62
7.2.100.0000.02416.70
7.2.90.0060.01616.58
7.2.80.0180.00716.55
7.2.70.0190.00816.70
7.2.60.0140.01116.73
7.2.50.0150.00616.73
7.2.40.0080.01616.67
7.2.30.0100.01316.61
7.2.20.0180.00716.69
7.2.10.0060.01516.73
7.2.00.0030.02216.71

preferences:
168.99 ms | 403 KiB | 5 Q