I\'ve got an array of cats objects:
$cats = Array
(
[0] => stdClass Object
(
[id] => 15
),
You can do it easily with ouzo goodies
$result = array_map(Functions::extract()->id, $arr);
or with Arrays (from ouzo goodies)
$result = Arrays::map($arr, Functions::extract()->id);
Check out: http://ouzo.readthedocs.org/en/latest/utils/functions.html#extract
See also functional programming with ouzo (I cannot post a link).