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) { sscanf($v, '%[^(](+£%f)', $item, $price); $result[rtrim($item)] = $price ?? 0; unset($price); } 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.0110.00818.71
8.4.120.0070.00224.34
8.4.110.0130.00720.80
8.4.100.0100.01018.98
8.4.90.0150.00520.43
8.4.80.0090.01018.90
8.4.70.0050.00418.91
8.4.60.0120.01119.08
8.4.50.0110.01020.18
8.4.40.0140.00717.80
8.4.30.0090.00618.73
8.4.20.0140.00721.32
8.4.10.0040.00419.29
8.3.260.0110.00916.74
8.3.250.0120.00818.99
8.3.240.0120.00717.02
8.3.230.0060.00316.70
8.3.220.0130.00719.04
8.3.210.0110.00818.57
8.3.200.0080.00316.48
8.3.190.0080.01117.10
8.3.180.0090.01118.96
8.3.170.0030.00618.77
8.3.160.0090.00017.07
8.3.150.0080.01117.37
8.3.140.0000.00816.50
8.3.130.0030.00616.69
8.3.120.0000.01520.62
8.3.110.0120.00320.94
8.3.100.0030.00724.06
8.3.90.0040.01126.77
8.3.80.0060.00318.43
8.3.70.0110.01118.43
8.3.60.0130.00618.43
8.3.50.0100.01017.97
8.3.40.0350.00617.97
8.3.30.0420.00817.97
8.3.20.0520.01017.97
8.3.10.0390.01117.97
8.3.00.0290.01217.97
8.2.290.0120.00920.47
8.2.280.0110.00818.27
8.2.270.0060.00317.37
8.2.260.0130.00317.14
8.2.250.0080.00018.34
8.2.240.0070.00419.03
8.2.230.0000.00922.58
8.2.220.0030.00637.54
8.2.210.0140.00426.77
8.2.200.0040.00416.88
8.2.190.0350.01017.97
8.2.180.0320.01017.97
8.2.170.0360.01017.97
8.2.160.0310.00817.97
8.2.150.0410.00417.97
8.2.140.0310.00917.97
8.2.130.0410.00617.97
8.2.120.0390.00017.97
8.2.110.0420.00617.97
8.2.100.0270.00517.97
8.2.90.0210.00817.97
8.2.80.0160.00617.97
8.2.70.0190.00317.97
8.2.60.0030.00719.22
8.2.50.0180.00417.97
8.2.40.0180.00717.97
8.2.30.0250.00317.97
8.2.20.0350.00417.97
8.2.10.0300.00917.97
8.2.00.0160.01617.97
8.1.330.0110.00721.89
8.1.320.0090.00921.91
8.1.310.0100.01016.54
8.1.300.0110.00420.28
8.1.290.0030.00630.84
8.1.280.0200.02017.97
8.1.270.0340.00717.97
8.1.260.0310.00617.97
8.1.250.0220.00718.95
8.1.240.0210.00517.97
8.1.230.0180.00417.97
8.1.220.0110.01117.97
8.1.210.0230.00817.97
8.1.200.0250.00017.97
8.1.190.0270.00317.97
8.1.180.0240.00517.97
8.1.170.0230.00517.97
8.1.160.0360.00317.97
8.1.150.0280.01217.97
8.1.140.0280.01317.97
8.1.130.0200.02017.97
8.1.120.0170.00317.97
8.1.110.0220.00317.97
8.1.100.0200.00317.97
8.1.90.0240.00617.97
8.1.80.0200.00017.97
8.1.70.0290.00017.97
8.1.60.0320.00317.97
8.1.50.0260.00817.97
8.1.40.0270.00717.97
8.1.30.0190.00817.97
8.1.20.0220.00017.97
8.1.10.0210.00317.97
8.1.00.0240.00017.97

preferences:
29.04 ms | 403 KiB | 5 Q