3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $records = array( array( 1 => 2135, 'first_name' => 'John', 'last_name' => 'Doe', ), array( 1 => 3245, 'first_name' => 'Sally', 'last_name' => 'Smith', ), array( 1 => 5342, 'first_name' => 'Jane', 'last_name' => 'Jones', ), array( 1 => 5623, 'first_name' => 'Peter', 'last_name' => 'Doe', ) ); var_dump(array_column($records, 1));
Output for 5.6.0 - 7.3.0rc3
array(4) { [0]=> int(2135) [1]=> int(3245) [2]=> int(5342) [3]=> int(5623) }