3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows = array ( 0 => array ( 'name' => 'Roger', 'id' => '1', ), 1 => array ( 'name' => 'David', 'id' => '2', ), 2 => array ( 'name' => 'David', 'id' => '2', ), ); $output = []; foreach ($rows as $row) { $output[$row['id']] = $row; } print_r($output);

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.0110.00820.63
8.4.110.0050.00822.44
8.4.100.0070.00418.70
8.4.90.0090.01020.39
8.4.80.0060.00320.32
8.4.70.0040.00418.23
8.4.60.0080.00218.67
8.4.50.0120.00818.63
8.4.40.0160.00319.18
8.4.30.0040.00420.75
8.4.20.0140.00025.90
8.4.10.0100.01023.65
8.3.250.0110.00818.67
8.3.240.0110.00816.24
8.3.230.0110.00816.41
8.3.220.0120.00819.06
8.3.210.0080.00616.84
8.3.200.0060.00316.71
8.3.190.0100.01118.79
8.3.180.0100.00716.93
8.3.170.0140.00419.00
8.3.160.0110.00718.45
8.3.150.0070.01118.61
8.3.140.0140.00318.49
8.3.130.0030.00618.30
8.3.120.0120.00318.75
8.3.110.0110.00720.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0080.00416.50
8.3.70.0070.01116.50
8.3.60.0060.01016.38
8.3.50.0000.01516.47
8.3.40.0120.00919.96
8.3.30.0040.01118.85
8.3.20.0050.00224.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.290.0120.00616.43
8.2.280.0100.00918.29
8.2.270.0150.00317.04
8.2.260.0080.00816.61
8.2.250.0040.00416.42
8.2.240.0000.01016.66
8.2.230.0080.00022.58
8.2.220.0030.00537.54
8.2.210.0070.00026.77
8.2.200.0060.00316.50
8.2.190.0120.00916.75
8.2.180.0100.00716.38
8.2.170.0160.00618.84
8.2.160.0100.00322.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00726.16
8.2.110.0100.00022.19
8.2.100.0120.00017.97
8.2.90.0040.00417.88
8.2.80.0080.00018.81
8.2.70.0040.00417.63
8.2.60.0020.00517.63
8.2.50.0000.00817.63
8.2.40.0110.00517.63
8.2.30.0160.00017.62
8.2.20.0160.00017.62
8.2.10.0120.00617.75
8.2.00.0120.00517.62
8.1.330.0090.01221.86
8.1.320.0090.00917.89
8.1.310.0030.00617.80
8.1.300.0040.00416.00
8.1.290.0080.00018.88
8.1.280.0120.00325.92
8.1.270.0060.00322.24
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0030.00623.83
8.1.230.0040.00719.15
8.1.220.0040.00417.77
8.1.210.0000.00818.77
8.1.200.0000.00917.47
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0170.00017.62
8.1.160.0130.00317.62
8.1.150.0180.00017.62
8.1.140.0140.00317.62
8.1.130.0120.00417.62
8.1.120.0090.00917.62
8.1.110.0150.00217.62
8.1.100.0140.00317.62
8.1.90.0090.00617.62
8.1.80.0070.01017.62
8.1.70.0060.01117.62
8.1.60.0130.00417.62
8.1.50.0130.00717.62
8.1.40.0160.00617.62
8.1.30.0180.00417.62
8.1.20.0140.00517.62
8.1.10.0150.00517.62
8.1.00.0180.00317.62
8.0.300.0000.00719.79
8.0.290.0040.00416.63
8.0.280.0130.00317.62
8.0.270.0180.00017.62
8.0.260.0140.00317.62
8.0.250.0110.00517.62
8.0.240.0120.00417.62
8.0.230.0090.00917.62
8.0.220.0120.00417.62
8.0.210.0170.00017.62
8.0.200.0100.00717.62
8.0.190.0110.00617.62
8.0.180.0100.00817.62
8.0.170.0200.00017.62
8.0.160.0130.00417.62
8.0.150.0060.01217.62
8.0.140.0140.00617.62
8.0.130.0110.00717.62
8.0.120.0090.00917.62
8.0.110.0150.00617.62
8.0.100.0100.01017.62
8.0.90.0140.00217.62
8.0.80.0180.00017.62
8.0.70.0130.00417.62
8.0.60.0080.00817.62
8.0.50.0120.00417.62
8.0.30.0150.00017.62
8.0.20.0120.00417.62
8.0.10.0130.00317.62

preferences:
27.22 ms | 403 KiB | 5 Q