Change History (22)

The function states that it the $list parameter is an array that contains arrays or objects:

/**
* Pluck a certain field out of each object in a list
*
* @since 3.1.0
*
* @param array $list A list of objects or arrays
* @param int|string $field A field from the object to place instead of the entire object
* @return array
*/
function wp_list_pluck( $list, $field ) {

It does not state that it operates on an array that contains referecens to other arrays.

As well as it doesn't state that it operates on an array that contains references to other objects.

That's not what it has been made fore. So why do you expect it to be working with references?

And if it is expected to be working with references, shouldn't it return references then?

By the way, you should add a short explanatory comment to the line with unset(), as it's not obvious why it's there.

Do you really think it is necessary to explain how PHP works? What should be left there? A link to the PHP manual? What's the part you think needs to be explained in a comment? That unset is removing references from variables?