Beispiel #1
0
/**
 * Pluck a certain field out of each object in a list by reference.
 * This will change the values of the original array/object list.
 *
 * @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 list_pluck_ref(&$list, $field)
{
    return \Phpf\Util\Arr::pluckRef($list, $field);
}