3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'Some Text', 'Some Other Text (+£14.20)', 'Foo', 'Text Text (+£26.88)', 'Another One (+£68.04)', ]; $result = []; foreach ($array as $v) { $a = preg_split('/ \(\+£([^)]+)\)/', $v, 2, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); $result[$a[0]] = (float) ($a[1] ?? 0); } var_export($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.130.0100.00617.86
8.4.120.0140.00520.80
8.4.110.0120.00522.58
8.4.100.0110.00718.75
8.4.90.0030.00622.45
8.4.80.0030.00618.64
8.4.70.0170.00518.06
8.4.60.0090.01118.89
8.4.50.0090.01018.69
8.4.40.0030.01617.91
8.4.30.0110.00318.73
8.4.20.0040.01621.50
8.4.10.0060.00319.72
8.3.260.0140.00616.91
8.3.250.0130.00518.61
8.3.240.0110.00616.52
8.3.230.0050.00516.79
8.3.220.0130.00418.95
8.3.210.0100.00516.75
8.3.200.0050.00416.86
8.3.190.0110.00719.18
8.3.180.0110.00616.97
8.3.170.0060.00318.70
8.3.160.0070.01016.69
8.3.150.0110.00717.29
8.3.140.0110.00617.13
8.3.130.0030.00618.52
8.3.120.0040.00718.91
8.3.110.0080.00020.94
8.3.100.0040.00424.06
8.3.90.0060.00326.77
8.3.80.0060.00317.97
8.3.70.0070.00318.43
8.3.60.0000.01018.31
8.3.50.0040.00818.45
8.3.40.0140.00917.97
8.3.30.0170.00417.97
8.3.20.0230.00517.97
8.3.10.0290.00617.97
8.3.00.0200.00917.97
8.2.290.0120.00620.23
8.2.280.0110.00818.44
8.2.270.0120.00617.34
8.2.260.0070.00718.32
8.2.250.0040.00418.70
8.2.240.0090.00019.28
8.2.230.0030.00622.58
8.2.220.0000.00937.54
8.2.210.0130.00726.77
8.2.200.0060.00318.54
8.2.190.0240.00517.97
8.2.180.0280.00517.97
8.2.170.0280.00917.97
8.2.160.0410.00317.97
8.2.150.0350.00617.97
8.2.140.0360.00717.97
8.2.130.0410.00717.97
8.2.120.0330.00317.97
8.2.110.0210.00717.97
8.2.100.0180.00617.97
8.2.90.0180.00617.97
8.2.80.0220.00419.23
8.2.70.0070.01817.97
8.2.60.0290.00017.97
8.2.50.0220.00317.97
8.2.40.0210.00017.97
8.2.30.0220.00017.97
8.2.20.0180.00317.97
8.2.10.0260.00017.97
8.2.00.0220.00017.97
8.1.330.0100.01022.15
8.1.320.0080.01217.96
8.1.310.0040.01116.54
8.1.300.0040.00418.29
8.1.290.0060.00330.84
8.1.280.0150.01017.97
8.1.270.0170.00917.97
8.1.260.0210.00617.97
8.1.250.0210.00317.97
8.1.240.0240.00017.97
8.1.230.0260.00017.97
8.1.220.0250.00317.97
8.1.210.0210.00617.97
8.1.200.0210.00617.97
8.1.190.0230.00517.97
8.1.180.0270.00017.97
8.1.170.0290.00417.97
8.1.160.0180.00717.97
8.1.150.0170.00717.97
8.1.140.0160.00817.97
8.1.130.0260.00017.97
8.1.120.0220.00317.97
8.1.110.0180.00617.97
8.1.100.0240.00717.97
8.1.90.0250.01117.97
8.1.80.0300.00417.97
8.1.70.0140.00917.97
8.1.60.0170.00617.97
8.1.50.0270.00417.97
8.1.40.0230.01317.97
8.1.30.0330.00917.97
8.1.20.0270.00817.97
8.1.10.0260.00617.97
8.1.00.0250.00917.97

preferences:
29.26 ms | 403 KiB | 5 Q