3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'Sunscreen 25g (200 Quantity)', 'Lubricant 100ml (50 Quantity)', 'WD-40 100ml (75 Quantity)', ]; foreach ($strings as $string) { echo (preg_match('~\(\K\d+~', $string, $match) ? $match[0] : 'no quantity') . "\n"; }

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.120.0090.01124.27
8.4.110.0110.01020.63
8.4.100.0040.00418.89
8.4.90.0150.00522.16
8.4.80.0140.00418.16
8.4.70.0060.00218.00
8.4.60.0100.01018.86
8.4.50.0090.00820.55
8.4.40.0120.00919.64
8.4.30.0100.01020.33
8.4.20.0190.00024.34
8.4.10.0160.00324.16
8.3.250.0120.00718.84
8.3.240.0110.00917.19
8.3.230.0110.01016.67
8.3.220.0100.00817.07
8.3.210.0080.00716.65
8.3.200.0060.00316.71
8.3.190.0040.00417.17
8.3.180.0090.01018.36
8.3.170.0130.00617.29
8.3.160.0130.00618.46
8.3.150.0080.00816.82
8.3.140.0110.00716.54
8.3.130.0000.00818.59
8.3.120.0040.00418.70
8.3.110.0040.00418.72
8.3.100.0040.00418.34
8.3.90.0100.00626.77
8.3.80.0060.00316.50
8.3.70.0080.00816.75
8.3.60.0070.00716.63
8.3.50.0140.00624.49
8.3.40.0180.00319.00
8.3.30.0100.00718.96
8.3.20.0050.00224.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0110.00320.47
8.2.280.0100.01018.67
8.2.270.0040.01517.50
8.2.260.0060.00318.61
8.2.250.0030.00518.85
8.2.240.0000.00817.13
8.2.230.0080.00020.94
8.2.220.0080.00024.06
8.2.210.0050.00326.77
8.2.200.0030.00716.75
8.2.190.0140.00316.61
8.2.180.0090.00625.92
8.2.170.0110.00418.91
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0070.00324.66
8.2.130.0110.00326.16
8.2.120.0060.00319.09
8.2.110.0090.00022.38
8.2.100.0090.00317.78
8.2.90.0040.00418.00
8.2.80.0050.00318.84
8.2.70.0030.00617.61
8.2.60.0040.00417.88
8.2.50.0040.00417.75
8.2.40.0040.00419.73
8.2.30.0040.00418.03
8.2.20.0000.00818.10
8.2.10.0040.00419.30
8.2.00.0070.00019.28
8.1.330.0120.00722.15
8.1.320.0100.01016.68
8.1.310.0040.00418.69
8.1.300.0150.00318.57
8.1.290.0040.00430.84
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0090.00028.09
8.1.240.0090.00023.79
8.1.230.0070.00419.00
8.1.220.0000.00817.77
8.1.210.0030.00518.77
8.1.200.0070.00317.35
8.1.190.0040.00417.35
8.1.180.0030.00518.10
8.1.170.0040.00417.65
8.1.160.0040.00418.81
8.1.150.0000.00818.98
8.1.140.0000.00818.96
8.1.130.0000.00717.61
8.1.120.0030.00517.63
8.1.110.0110.00017.59
8.1.100.0040.00417.60
8.1.90.0040.00417.63
8.1.80.0110.00217.66
8.1.70.0000.00817.50
8.1.60.0040.00417.77
8.1.50.0000.00817.69
8.1.40.0000.00817.67
8.1.30.0040.00417.75
8.1.20.0030.00517.71
8.1.10.0080.00017.70
8.1.00.0060.00317.66
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00720.14
8.0.270.0050.00218.07
8.0.260.0000.00716.96
8.0.250.0000.00717.12
8.0.240.0030.00317.04
8.0.230.0000.00817.11
8.0.220.0000.00716.94
8.0.210.0100.00016.98
8.0.200.0030.00517.14
8.0.190.0000.00717.11
8.0.180.0000.00817.08
8.0.170.0030.00617.05
8.0.160.0080.00017.11
8.0.150.0080.00016.93
8.0.140.0070.00017.00
8.0.130.0000.00613.40
8.0.120.0050.00317.11
8.0.110.0040.00416.93
8.0.100.0070.00017.15
8.0.90.0040.00417.08
8.0.80.0110.00416.94
8.0.70.0050.00316.94
8.0.60.0000.00816.93
8.0.50.0070.00017.05
8.0.30.0100.00717.45
8.0.20.0110.00917.45
8.0.10.0030.00516.98
8.0.00.0170.01017.17
7.4.330.0020.00215.55
7.4.320.0000.00716.81
7.4.300.0030.00316.83
7.4.290.0040.00416.80
7.4.280.0080.00016.79
7.4.270.0000.00816.82
7.4.260.0050.00013.52
7.4.250.0030.00316.73
7.4.240.0070.00016.71
7.4.230.0000.00716.56
7.4.220.0020.00516.77
7.4.210.0090.00616.84
7.4.200.0000.00816.62
7.4.130.0130.00516.72
7.4.120.0090.01616.67
7.4.110.0130.01016.79
7.4.100.0100.01016.71
7.4.90.0170.00316.82
7.4.80.0120.00616.62
7.4.70.0120.00616.75
7.4.60.0040.01516.61
7.4.50.0120.00616.59
7.4.40.0100.01416.68
7.4.30.0140.00716.85
7.4.20.0110.01116.84
7.4.10.0070.01116.61
7.4.00.0190.00416.80
7.3.330.0030.00616.58
7.3.320.0060.00013.22
7.3.310.0000.00616.41
7.3.300.0030.00316.53
7.3.290.0080.00716.42
7.3.280.0130.00416.46
7.3.260.0000.01716.66
7.3.230.0130.00916.55
7.3.210.0120.00616.50
7.3.200.0130.00316.40
7.3.190.0100.00716.84
7.3.180.0070.01116.71
7.3.170.0090.01216.46
7.3.160.0150.00916.55
7.3.150.0070.01316.87
7.3.140.0120.00716.46
7.3.130.0160.00316.68
7.3.120.0130.00716.79
7.3.110.0090.00916.41
7.3.100.0110.00916.71
7.3.90.0100.01016.52
7.3.80.0120.00916.72
7.3.70.0110.00816.52
7.3.60.0000.02016.38
7.3.50.0160.00716.46
7.3.40.0150.00416.35
7.3.30.0060.01216.54
7.3.20.0110.01116.66
7.3.10.0100.00916.48
7.3.00.0060.01516.42
7.2.330.0060.01116.71
7.2.320.0090.00916.81
7.2.310.0080.01116.78
7.2.300.0100.01316.77
7.2.290.0060.01416.78
7.2.280.0160.00616.68
7.2.270.0100.00916.83
7.2.260.0170.00716.79
7.2.250.0130.00816.71
7.2.240.0080.01516.69
7.2.230.0080.00916.88
7.2.220.0090.00916.90
7.2.210.0100.01016.80
7.2.200.0080.01116.61
7.2.190.0060.01216.46
7.2.180.0070.01416.91
7.2.170.0090.01216.59
7.2.160.0160.00616.82
7.2.150.0100.00916.80
7.2.140.0090.01516.70
7.2.130.0120.00616.84
7.2.120.0150.00316.77
7.2.110.0170.01416.73
7.2.100.0170.01516.85
7.2.90.0150.01216.71
7.2.80.0030.01616.61
7.2.70.0100.01016.65
7.2.60.0030.01716.70
7.2.50.0090.01516.80
7.2.40.0130.01016.83
7.2.30.0090.00916.86
7.2.20.0070.01016.68
7.2.10.0110.00716.77
7.2.00.0100.01016.66

preferences:
30.04 ms | 403 KiB | 5 Q