3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ["foo" => "bar1", "hey" => "now"], ["foo" => "bar2", "hey" => "what"], [0 => "zero", 1 => "one"] ]; var_export(array_column($array, 'foo')); // get the column by name echo "\n---\n"; var_export(array_column($array, 0)); // don't need to be a string echo "\n---\n"; var_export(array_column($array, key(current($array)))); // access the first subarray, access its key echo "\n---\n"; var_export(array_column($array, array_shift(array_keys($array))));

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.140.0110.01017.68
8.4.130.0120.00817.67
8.4.120.0140.00522.14
8.4.110.0050.00822.70
8.4.100.0130.00917.84
8.4.90.0040.00420.84
8.4.80.0120.00617.81
8.4.70.0070.00619.88
8.4.60.0110.01019.00
8.4.50.0110.00918.33
8.4.40.0000.00919.57
8.4.30.0030.00817.66
8.4.20.0030.01320.47
8.4.10.0030.00617.77
8.3.270.0110.00816.62
8.3.260.0110.00816.50
8.3.250.0050.00219.02
8.3.240.0130.00716.79
8.3.230.0110.00816.40
8.3.220.0110.00716.93
8.3.210.0120.00416.64
8.3.200.0060.00516.77
8.3.190.0040.00619.07
8.3.180.0040.00318.29
8.3.170.0070.01020.78
8.3.160.0060.01217.28
8.3.150.0110.00720.54
8.3.140.0000.00720.67
8.3.130.0030.00618.50
8.3.120.0160.00020.59
8.3.110.0080.00020.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0030.00616.50
8.3.70.0120.00918.42
8.3.60.0060.01318.55
8.3.50.0050.00917.05
8.3.40.0080.00818.67
8.3.30.0140.00318.63
8.3.20.0040.00418.77
8.3.10.0000.00823.67
8.3.00.0000.00821.34
8.2.290.0080.00720.50
8.2.280.0120.00720.13
8.2.270.0060.01316.95
8.2.260.0070.01118.42
8.2.250.0040.00416.71
8.2.240.0060.00317.20
8.2.230.0080.00022.58
8.2.220.0100.00037.54
8.2.210.0080.00026.77
8.2.200.0030.00716.50
8.2.190.0150.00616.75
8.2.180.0090.00918.54
8.2.170.0090.00622.96
8.2.160.0060.00920.21
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0000.00819.64
8.2.120.0000.00726.35
8.2.110.0140.00322.30
8.2.100.0060.00619.59
8.2.90.0000.00917.88
8.2.80.0080.00017.97
8.2.70.0060.00317.93
8.2.60.0000.00718.16
8.2.50.0050.00218.10
8.2.40.0060.00219.48
8.2.30.0030.00619.20
8.2.20.0000.00718.00
8.2.10.0040.00418.15
8.2.00.0040.00417.53
8.1.330.0150.00321.94
8.1.320.0110.00916.19
8.1.310.0030.00618.65
8.1.300.0080.00818.19
8.1.290.0060.00318.88
8.1.280.0100.01025.92
8.1.270.0080.00018.88
8.1.260.0140.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00720.90
8.1.230.0080.00317.77
8.1.220.0030.00617.74
8.1.210.0050.00318.77
8.1.200.0060.00317.22
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0040.00418.50
8.1.160.0040.00418.84
8.1.150.0040.00418.84
8.1.140.0070.00021.92
8.1.130.0040.00420.09
8.1.120.0070.00017.46
8.1.110.0040.00417.43
8.1.100.0040.00417.40
8.1.90.0040.00417.25
8.1.80.0070.00017.38
8.1.70.0030.00517.35
8.1.60.0050.00517.53
8.1.50.0040.00417.44
8.1.40.0000.00817.46
8.1.30.0000.00717.55
8.1.20.0000.00717.58
8.1.10.0040.00417.50
8.1.00.0000.00717.34
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.33
8.0.270.0070.00017.26
8.0.260.0040.00420.12
8.0.250.0030.00316.91
8.0.240.0040.00416.96
8.0.230.0030.00516.90
8.0.220.0030.00316.88
8.0.210.0040.00416.93
8.0.200.0000.00716.84
8.0.190.0040.00416.83
8.0.180.0000.00817.00
8.0.170.0060.00317.00
8.0.160.0050.00216.80
8.0.150.0030.00416.88
8.0.140.0030.00516.86
8.0.130.0000.00613.30
8.0.120.0050.00316.83
8.0.110.0080.00016.97
8.0.100.0040.00416.88
8.0.90.0040.00416.73
8.0.80.0070.00916.93
8.0.70.0000.00816.85
8.0.60.0050.00216.95
8.0.50.0030.00316.89
8.0.30.0090.01017.08
8.0.20.0080.01117.40
8.0.10.0070.00016.86
8.0.00.0070.01116.83
7.4.330.0000.00515.55
7.4.320.0030.00316.35
7.4.300.0030.00316.57
7.4.290.0000.00716.38
7.4.280.0030.00616.54
7.4.270.0000.00716.56
7.4.260.0060.00316.43
7.4.250.0000.00716.41
7.4.240.0000.00916.60
7.4.230.0080.00016.53
7.4.220.0050.00216.35
7.4.210.0090.00716.59
7.4.200.0030.00316.51
7.4.160.0090.00816.57
7.4.140.0100.00717.86
7.4.130.0090.00916.57
7.4.120.0120.00716.55
7.4.110.0080.01116.60
7.4.100.0070.01516.54
7.4.90.0080.00816.48
7.4.80.0080.00819.39
7.4.70.0080.01416.52
7.4.60.0040.01216.72
7.4.50.0110.00716.41
7.4.40.0060.01016.44
7.4.00.0080.01014.93
7.3.330.0000.00513.12
7.3.320.0030.00313.08
7.3.310.0070.00016.32
7.3.300.0000.00616.27
7.3.290.0000.00816.16
7.3.280.0110.00816.26
7.3.260.0110.00916.29
7.3.240.0090.00716.39
7.3.230.0100.00616.45
7.3.210.0130.00416.46
7.3.200.0060.01016.39
7.3.190.0080.00816.31
7.3.180.0090.01216.32
7.3.170.0060.01616.56
7.3.160.0120.00416.33
7.3.120.0100.00914.68
7.3.110.0050.01114.76
7.3.100.0090.00714.66
7.3.90.0040.01114.64
7.3.80.0060.00514.84
7.3.70.0050.00914.85
7.3.60.0050.00614.79
7.3.50.0040.01014.90
7.3.40.0060.00714.83
7.3.30.0060.00614.60
7.3.20.0060.00816.52
7.3.10.0110.00516.54
7.3.00.0040.01116.68
7.2.330.0100.01316.63
7.2.320.0090.00916.21
7.2.310.0060.01016.59
7.2.300.0120.00316.38
7.2.290.0060.01016.56
7.2.250.0080.01014.91
7.2.240.0060.00914.98
7.2.230.0060.00614.70
7.2.220.0050.01014.85
7.2.210.0040.00715.02
7.2.200.0060.00814.82
7.2.190.0060.00815.06
7.2.180.0070.00414.92
7.2.170.0050.01014.88
7.2.110.0200.00814.52
7.2.100.1390.00014.68
7.2.90.3070.01014.26
7.2.80.3010.00314.15
7.2.70.3340.01014.78
7.2.60.4320.01014.59
7.2.50.3950.00314.27
7.2.40.3540.01014.43
7.2.30.2240.00014.41
7.2.20.4290.01014.48
7.2.10.2970.01014.86
7.2.00.3350.01314.52
7.1.330.0020.01315.59
7.1.320.0050.00815.89
7.1.310.0030.01015.89
7.1.300.0030.00915.77
7.1.290.0050.00715.89
7.1.280.0070.00515.86
7.1.270.0050.00715.71
7.1.260.0090.00515.67
7.1.230.0420.00313.79
7.1.220.1490.00613.67
7.1.210.0280.00313.40
7.1.200.2680.01313.60
7.1.190.3160.01013.45
7.1.180.3970.00913.64
7.1.170.2600.00713.18
7.1.160.3510.00313.67
7.1.150.3730.00713.33
7.1.140.3010.00613.51
7.1.130.2400.01013.71
7.1.120.3690.00013.56
7.1.110.3210.00313.64
7.1.100.2850.01313.42
7.1.90.3510.00713.73
7.1.80.2810.00313.64
7.1.70.2690.00313.48
7.1.60.3190.01331.43
7.1.50.3970.00731.58
7.1.40.3940.01331.67
7.1.30.4040.01031.18
7.1.20.4490.00731.70
7.1.10.4060.00313.61
7.1.00.3160.00613.53
5.6.380.0000.01714.08

preferences:
85.56 ms | 403 KiB | 5 Q