3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tags = array( array('tag_id' => 1, 'tag_name' => 'Hello', 'album_id' => 1), array('tag_id' => 1, 'tag_name' => 'Hello', 'album_id' => 2), array('tag_id' => 2, 'tag_name' => 'World', 'album_id' => 1), array('tag_id' => 2, 'tag_name' => 'World', 'album_id' => 2), array('tag_id' => 3, 'tag_name' => 'Again', 'album_id' => 3) ); //$org_tags = array(); //foreach ($tags as $tag) { //} print_r(array_column($tags, 'album_id'));
Output for 5.5.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 1 [1] => 2 [2] => 1 [3] => 2 [4] => 3 )
Output for 5.0.0 - 5.4.45
Fatal error: Call to undefined function array_column() in /in/Mn3oM on line 17
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_column() in /in/Mn3oM on line 17
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_column() in /in/Mn3oM on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_column() in /in/Mn3oM on line 17