# Functionality updates to array_column()

- Thread: https://externals.io/message/67113
- Original archive: https://news-web.php.net/php.internals/67113
- Started by Florian Anderiasch on 2013-04-23T09:09:17+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #67110 — Sherif Ramadan — 2013-04-22T21:35:21+00:00

URL: https://externals.io/message/67113#67110

> I've just submitted the following pull request for updates to the
> `array_column()` function:
>
> https://github.com/php/php-**src/pull/331<https://github.com/php/php-src/pull/331>
>
> I asked about these changes on the #php.pecl IRC channel a few weeks ago,
> and others on the channel agreed that it was best to go ahead and submit
> these changes while PHP 5.5 is still in beta, since these would potentially
> create BC breaks once 5.5 is in RC or GA stages.
>
>
I might be wrong here, but I thought beta was a feature freeze. Is it not?


> I'm not certain of the proper process for handling these changes, though.
> Do I need to update the RFC to account for these changes? Would I then need
> to call for another vote?
>
> The changes are detailed on the PR, but I'm reproducing that description
> here, for the sake of discussion:
>
>
> This pull request updates the `array_column()` function to support the
> following new functionality:
>
> * Maintain original index association if no third parameter
> * Second param should be optional to use entire rows as result
> * Support array of column names for second parameter
>
> Here are more detailed descriptions of the additional functionality:
>
>
> ### Maintain original index association if no third parameter
>
> If no third parameter is passed, the resulting array maintains the indexes
> passed in from the original array. Feature suggested by David Zülke.
>
>
> ### Second param should be optional to use entire rows as result
>
> When `NULL` is passed as the second parameter, all columns from the input
> array are returned. See https://bugs.php.net/bug.php?**id=64493<https://bugs.php.net/bug.php?id=64493>
>
>
> ### Support array of column names for second parameter
>
> If the second parameter is an array of column names, each row returned in
> the result array is an array containing only the specified columns. The
> rows are indexed by the third parameter. Feature inspired by suggestions
> from Hakre and Craig Campbell. See https://github.com/php/php-**
> src/issues/257#issuecomment-**12594630<https://github.com/php/php-src/issues/257#issuecomment-12594630>
>
>
> Thanks,
> Ben

---

## #67111 — David Muir — 2013-04-23T04:50:32+00:00

URL: https://externals.io/message/67113#67111 · In reply to: #67110

> 
>
> > […]
> I might be wrong here, but I thought beta was a feature freeze. Is it not?
>

First Beta is slated for tomorrow, isn't it?

David

---

## #67112 — David Muir — 2013-04-23T04:51:55+00:00

URL: https://externals.io/message/67113#67112 · In reply to: #67111

> 
> > […]
>
> First Beta is slated for tomorrow, isn't it?
>
> David


Haha, oops. Just noticed that the 3rd beta is already out.

---

## #67113 — Florian Anderiasch — 2013-04-23T09:09:17+00:00

URL: https://externals.io/message/67113#67113 · In reply to: #67110

> 
> 
> > […]
> I might be wrong here, but I thought beta was a feature freeze. Is it not?
> 

Not sure if this applies to a feature that's just been included before
(or during?) the alphas/betas.

I'd prefer to ship 5.5 with a stable/final feature - so better get it in
now than in 5.5.1 with (even slightly) different behavior...

Greetings,
Florian
