array_column on an array of objects needs public properties

array_column has worked on objects since 7.0, and it reads properties rather than calling getters — so it silently returns nothing for a well-encapsulated class.

final class Row { public $sku; private $price; }

array_column($rows, 'sku');     // works
array_column($rows, 'price');   // [] — private

// for anything with getters:
array_map(function (Row $r) { return $r->price(); }, $rows);

It does respect __get and __isset, which is how it works on some ORM models and not others — a difference that makes the behaviour look arbitrary from the outside. The empty array rather than an error is the dangerous part: a report that silently loses a column is worse than one that fails. For objects the explicit array_map is clearer and costs nothing; array_column earns its place on arrays of rows from a database.