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_replace('~[^(]+\((\d+).*~', '$1', $string) . "\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.140.0110.01117.61
8.4.130.0120.00818.89
8.4.120.0110.00923.92
8.4.110.0110.00918.92
8.4.100.0100.01018.63
8.4.90.0080.00820.45
8.4.80.0050.00518.07
8.4.70.0070.01418.09
8.4.60.0130.00918.86
8.4.50.0120.00818.89
8.4.40.0130.00617.71
8.4.30.0100.01020.45
8.4.20.0130.00723.91
8.4.10.0000.00824.19
8.3.270.0120.00716.83
8.3.260.0050.00316.87
8.3.250.0100.00918.71
8.3.240.0110.00817.10
8.3.230.0130.00716.78
8.3.220.0130.00717.21
8.3.210.0040.00416.76
8.3.200.0050.00316.62
8.3.190.0030.00416.99
8.3.180.0030.00520.72
8.3.170.0180.00017.07
8.3.160.0060.01318.46
8.3.150.0040.00416.75
8.3.140.0080.00018.91
8.3.130.0030.00618.48
8.3.120.0120.00318.74
8.3.110.0060.00320.94
8.3.100.0040.00424.06
8.3.90.0080.00026.77
8.3.80.0060.00316.83
8.3.70.0120.00916.63
8.3.60.0170.00316.63
8.3.50.0090.00924.52
8.3.40.0140.00718.92
8.3.30.0120.00918.97
8.3.20.0070.00324.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.290.0100.00920.68
8.2.280.0120.00718.66
8.2.270.0090.00916.67
8.2.260.0140.00016.90
8.2.250.0040.00416.72
8.2.240.0050.00318.96
8.2.230.0030.00622.58
8.2.220.0060.00337.54
8.2.210.0050.00326.77
8.2.200.0130.00016.63
8.2.190.0090.00616.58
8.2.180.0080.00825.92
8.2.170.0040.01119.01
8.2.160.0000.01422.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0080.00019.66
8.2.110.0000.00920.52
8.2.100.0040.00817.97
8.2.90.0040.00418.03
8.2.80.0090.00019.03
8.2.70.0050.00317.61
8.2.60.0050.00317.50
8.2.50.0040.00418.05
8.2.40.0000.00718.05
8.2.30.0000.00718.09
8.2.20.0070.00017.98
8.2.10.0080.00019.14
8.2.00.0030.00519.32
8.1.330.0130.00621.77
8.1.320.0120.00716.14
8.1.310.0100.00316.79
8.1.300.0030.00518.71
8.1.290.0060.00318.88
8.1.280.0120.00625.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00419.26
8.1.230.0070.00420.97
8.1.220.0080.00017.78
8.1.210.0040.00418.84
8.1.200.0060.00317.38
8.1.190.0070.00317.35
8.1.180.0040.00418.10
8.1.170.0080.00018.77
8.1.160.0120.00018.86
8.1.150.0050.00318.81
8.1.140.0000.00718.89
8.1.130.0030.00320.20
8.1.120.0040.00417.66
8.1.110.0090.00017.65
8.1.100.0070.00317.54
8.1.90.0030.00317.62
8.1.80.0000.01017.54
8.1.70.0050.00517.48
8.1.60.0080.00017.69
8.1.50.0080.00017.66
8.1.40.0000.00817.68
8.1.30.0000.00817.75
8.1.20.0060.00317.82
8.1.10.0030.00617.65
8.1.00.0030.00517.59
8.0.300.0000.00819.98
8.0.290.0040.00416.75
8.0.280.0030.00320.21
8.0.270.0030.00318.15
8.0.260.0060.00018.32
8.0.250.0070.00017.11
8.0.240.0000.00717.06
8.0.230.0070.00017.15
8.0.220.0000.00716.95
8.0.210.0000.00716.96
8.0.200.0060.00317.12
8.0.190.0040.00417.08
8.0.180.0060.00316.91
8.0.170.0040.00417.09
8.0.160.0030.00517.12
8.0.150.0040.00417.01
8.0.140.0040.00416.88
8.0.130.0000.00513.55
8.0.120.0040.00416.87
8.0.110.0050.00317.02
8.0.100.0050.00216.82
8.0.90.0000.00716.98
8.0.80.0060.01117.07
8.0.70.0070.00016.93
8.0.60.0040.00416.82
8.0.50.0000.00717.06
8.0.30.0100.00617.16
8.0.20.0100.01017.07
8.0.10.0000.00817.04
8.0.00.0090.00916.80
7.4.330.0050.00015.55
7.4.320.0040.00416.66
7.4.300.0000.00716.63
7.4.290.0030.00316.60
7.4.280.0070.00016.81
7.4.270.0040.00416.82
7.4.260.0030.00313.33
7.4.250.0000.00716.59
7.4.240.0030.00416.83
7.4.230.0040.00416.55
7.4.220.0040.00416.79
7.4.210.0060.00916.79
7.4.200.0030.00316.66
7.4.130.0140.00516.64
7.4.120.0170.00316.60
7.4.110.0170.00016.79
7.4.100.0030.01316.77
7.4.90.0110.00716.56
7.4.80.0120.00616.64
7.4.70.0090.01516.51
7.4.60.0120.00616.45
7.4.50.0110.00716.46
7.4.40.0070.01116.54
7.4.30.0150.00316.67
7.4.20.0120.00616.33
7.4.10.0100.00716.51
7.4.00.0150.00316.53
7.3.330.0060.00016.26
7.3.320.0060.00013.23
7.3.310.0000.00716.34
7.3.300.0000.00716.32
7.3.290.0080.00716.41
7.3.280.0110.00916.43
7.3.260.0090.01616.43
7.3.230.0170.00416.73
7.3.210.0140.00316.63
7.3.200.0120.00616.60
7.3.190.0130.01016.50
7.3.180.0110.00616.63
7.3.170.0060.01216.71
7.3.160.0070.01016.86
7.3.150.0120.00616.45
7.3.140.0090.00916.75
7.3.130.0090.00916.50
7.3.120.0090.00916.41
7.3.110.0150.00316.40
7.3.100.0110.01216.64
7.3.90.0000.01716.52
7.3.80.0070.01016.79
7.3.70.0040.01516.50
7.3.60.0030.01716.47
7.3.50.0110.00716.61
7.3.40.0030.01316.65
7.3.30.0130.00716.64
7.3.20.0090.00916.60
7.3.10.0150.01116.45
7.3.00.0110.00716.55
7.2.330.0040.02116.56
7.2.320.0130.00616.71
7.2.310.0140.00316.73
7.2.300.0110.00816.77
7.2.290.0070.01116.66
7.2.280.0040.01416.69
7.2.270.0110.00916.81
7.2.260.0030.01716.78
7.2.250.0060.01216.57
7.2.240.0100.01416.41
7.2.230.0100.01316.73
7.2.220.0110.00716.64
7.2.210.0060.01216.72
7.2.200.0120.00816.78
7.2.190.0160.00916.57
7.2.180.0100.00716.39
7.2.170.0030.01416.69
7.2.160.0130.01016.57
7.2.150.0080.01716.63
7.2.140.0100.01016.68
7.2.130.0060.01416.81
7.2.120.0110.00816.72
7.2.110.0110.00716.76
7.2.100.0130.00616.65
7.2.90.0150.00416.55
7.2.80.0150.00716.68
7.2.70.0180.00716.77
7.2.60.0230.00316.71
7.2.50.0040.01516.69
7.2.40.0140.00816.86
7.2.30.0110.01716.72
7.2.20.0140.01316.76
7.2.10.0130.00616.64
7.2.00.0050.01316.67

preferences:
134.41 ms | 403 KiB | 5 Q