3v4l.org

run code in 300+ PHP versions simultaneously
<?php $images = [ 'images' => [ 1620 => (object) [ 'filename' => 'Brancepeth Blue.png', 'id' => 1620 ], 1621 => (object) [ 'filename' => 'Item Blue.png', 'id' => 1621 ], 1622 => (object) [ 'filename' => 'Item Light Oak.png', 'id' => 1622 ] ] ]; $result = []; foreach ($images['images'] as $id => $obj) { sscanf($obj->filename, '%*s %[^.]', $colour); $result[$id] = ucfirst($colour); } 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.5.10.0110.00616.80
8.5.00.0100.01121.91
8.4.160.0140.01023.99
8.4.150.0020.00114.05
8.4.140.0130.00817.71
8.4.130.0130.00717.84
8.4.120.0100.01120.63
8.4.110.0140.00718.78
8.4.100.0140.00618.96
8.4.90.0120.00820.29
8.4.80.0130.00718.80
8.4.70.0040.00417.68
8.4.60.0120.00718.63
8.4.50.0080.01118.71
8.4.40.0160.00317.53
8.4.30.0060.01218.61
8.4.20.0180.00419.47
8.4.10.0080.00019.70
8.3.280.0080.01218.55
8.3.270.0120.00816.73
8.3.260.0110.00616.55
8.3.250.0110.00718.79
8.3.240.0070.01217.16
8.3.230.0140.00716.64
8.3.220.0140.00519.00
8.3.210.0030.00516.53
8.3.200.0050.00416.88
8.3.190.0080.01017.04
8.3.180.0130.00517.19
8.3.170.0070.01119.02
8.3.160.0070.01316.98
8.3.150.0060.00316.98
8.3.140.0090.00916.72
8.3.130.0040.00418.44
8.3.120.0090.00020.77
8.3.110.0090.00020.94
8.3.100.0090.00024.06
8.3.90.0080.00026.77
8.3.80.0040.00417.97
8.3.70.0310.00417.97
8.3.60.0270.00517.97
8.3.50.0080.00618.13
8.3.40.0240.00217.97
8.3.30.0220.00817.97
8.3.20.0220.00617.97
8.3.10.0320.00217.97
8.3.00.0300.00417.97
8.2.290.0120.00820.50
8.2.280.0080.01118.41
8.2.270.0070.00017.04
8.2.260.0000.00816.59
8.2.250.0050.00318.58
8.2.240.0080.00016.94
8.2.230.0080.00022.58
8.2.220.0120.00037.54
8.2.210.0040.00426.77
8.2.200.0060.00318.54
8.2.190.0330.00517.97
8.2.180.0150.01517.97
8.2.170.0290.00617.97
8.2.160.0310.00417.97
8.2.150.0250.00717.97
8.2.140.0230.01317.97
8.2.130.0290.00617.97
8.2.120.0260.00917.97
8.2.110.0270.00717.97
8.2.100.0250.01017.97
8.2.90.0240.01517.97
8.2.80.0320.00517.97
8.2.70.0200.01517.97
8.2.60.0320.00217.97
8.2.50.0250.00717.97
8.2.40.0190.00817.97
8.2.30.0220.00317.97
8.2.20.0190.00617.97
8.2.10.0160.00717.97
8.2.00.0200.00517.97
8.1.330.0080.00321.93
8.1.320.0140.00517.83
8.1.310.0070.01016.72
8.1.300.0100.00616.13
8.1.290.0030.00630.84
8.1.280.0200.00617.97
8.1.270.0220.00317.97
8.1.260.0150.00917.97
8.1.250.0130.01017.97
8.1.240.0200.00317.97
8.1.230.0260.00217.97
8.1.220.0210.00617.97
8.1.210.0270.00617.97
8.1.200.0290.01017.97
8.1.190.0310.00717.97
8.1.180.0260.01317.97
8.1.170.0320.00217.97
8.1.160.0240.00417.97
8.1.150.0240.00717.97
8.1.140.0170.01217.97
8.1.130.0210.00817.97
8.1.120.0210.01117.97
8.1.110.0240.00717.97
8.1.100.0260.00517.97
8.1.90.0280.00817.97
8.1.80.0420.00517.97
8.1.70.0340.00717.97
8.1.60.0320.00517.97
8.1.50.0310.01117.97
8.1.40.0310.00917.97
8.1.30.0340.00717.97
8.1.20.0280.00717.97
8.1.10.0240.00417.97
8.1.00.0220.00617.97

preferences:
33.45 ms | 403 KiB | 5 Q