3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( '0' => Array ( 'created_at' => 1991, 'updated_at' => 1992, 'customer_name' => 'john doe', 'line_items' => Array ( '0' => Array ( 'name' => 'Hello world poduct', 'price' => 800.00, 'id' => 123, 'quantity' => 2 ), '1' => Array ( 'name' => 'Hello world product 2', 'price' => 100.00, 'id' => 456, 'quantity' => 1 ) ) ), '1' => Array ( 'created_at' => 1992, 'updated_at' => 1993, 'customer_name' => 'Guido van Rossum', 'line_items' => Array ( '0' => Array ( 'name' => 'Hello world product', 'price' => 800.00, 'id' => 123, 'quantity' => 2 ), '1' => Array ( 'name' => 'Hello world poduct 2', 'price' => 100.00, 'id' => 456, 'quantity' => 3 ), '2' => Array ( 'name' => 'Hello world poduct 3', 'price' => 400.00, 'id' => 116, 'quantity' => 5 ) ) ) ); $result = []; foreach ($array as ['line_items' => $items]) { array_push($result, ...array_column($items, 'quantity')); } 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.120.0070.00922.40
8.4.110.0090.00722.35
8.4.100.0120.00918.68
8.4.90.0110.01017.72
8.4.80.0030.00519.39
8.4.70.0070.00317.82
8.4.60.0110.00918.84
8.4.50.0110.00919.35
8.4.40.0100.01017.57
8.4.30.0040.01520.39
8.4.20.0160.00619.64
8.4.10.0080.00019.48
8.3.250.0140.00619.15
8.3.240.0150.00617.00
8.3.230.0120.00916.21
8.3.220.0120.00718.47
8.3.210.0090.00918.41
8.3.200.0040.00516.80
8.3.190.0090.00716.86
8.3.180.0130.00518.64
8.3.170.0100.01016.49
8.3.160.0120.00617.38
8.3.150.0070.01117.32
8.3.140.0080.00016.81
8.3.130.0100.01016.48
8.3.120.0030.00618.92
8.3.110.0030.00620.94
8.3.100.0090.00018.43
8.3.90.0440.00426.77
8.3.80.0360.00726.77
8.3.70.0380.00026.77
8.3.60.0210.01426.77
8.3.50.0310.00326.77
8.3.40.0390.00626.77
8.3.30.0360.00426.77
8.3.20.0340.00726.77
8.3.10.0290.00726.77
8.3.00.0360.00426.77
8.2.290.0100.00820.64
8.2.280.0120.00719.99
8.2.270.0110.00817.10
8.2.260.0030.01016.46
8.2.250.0030.00716.57
8.2.240.0050.00517.43
8.2.230.0040.00422.58
8.2.220.0080.00024.06
8.2.210.0330.00726.77
8.2.200.0380.00326.77
8.2.190.0270.01526.77
8.2.180.0290.01326.77
8.2.170.0320.01426.77
8.2.160.0360.01026.77
8.2.150.0360.00726.77
8.2.140.0320.00426.77
8.2.130.0320.00326.77
8.2.120.0310.00726.77
8.2.110.0380.00726.77
8.2.100.0450.00026.77
8.2.90.0340.00926.77
8.2.80.0360.00726.77
8.2.70.0420.00826.77
8.2.60.0320.00626.77
8.2.50.0330.00026.77
8.2.40.0120.00826.77
8.2.30.0110.01126.77
8.2.20.0190.00426.77
8.2.10.0150.00626.77
8.2.00.0190.00026.77
8.1.330.0090.01022.11
8.1.320.0100.00916.16
8.1.310.0060.01316.36
8.1.300.0080.00415.94
8.1.290.0230.00526.77
8.1.280.0190.01226.77
8.1.270.0280.01226.77
8.1.260.0410.00326.77
8.1.250.0320.01126.77
8.1.240.0270.01526.77
8.1.230.0280.00926.77
8.1.220.0390.00326.77
8.1.210.0320.00626.77
8.1.200.0290.01026.77
8.1.190.0270.01126.77
8.1.180.0260.01326.77
8.1.170.0320.00626.77
8.1.160.0320.00626.77
8.1.150.0260.01326.77
8.1.140.0290.01126.77
8.1.130.0320.00726.77
8.1.120.0330.00626.77
8.1.110.0310.00926.77
8.1.100.0280.01126.77
8.1.90.0340.00426.77
8.1.80.0380.00026.77
8.1.70.0270.01226.77
8.1.60.0210.02126.77
8.1.50.0390.00426.77
8.1.40.0360.00326.77
8.1.30.0240.01026.77
8.1.20.0240.00026.77
8.1.10.0290.00726.77
8.1.00.0270.01526.77

preferences:
26.56 ms | 403 KiB | 5 Q