On 1/12/13 10:13 AM, Peter Cowburn wrote:
1. Why is this branch based on 5.3, rather than 5.4 or 5.5? Do you
want this to be part of 5.3? The RFC (in particular the vote question)
does not make it clear where/when you want this to be added.

I mentioned this in another response on this thread. I was just following instructions from the wiki, but I can issue another pull request against master or some other branch.

This is intended for 5.5.

2. The $columnKey argument "may be the 0-indexed number of the column
you wish to retrieve, or it may be the string key name for an
associative array."

When the nested arrays use numeric indices and the function is called
with a number, then this argument is not "the 0-indexed number of the
column" but rather the integer key (i.e., the $columnKey is always
specifying the key, regardless of integer or string).  Could the
description be updated to reflect that, if it is indeed the desired

I've updated the RFC on the wiki to include your suggestions.

behaviour?  Also, when the nested arrays are non-0-indexed should we
be able to somehow specify the column (rather than the key)? I have no
answer of my own for that last question!

I'm not quite sure what you're asking here. Do you mean specifying something like the numeric column position, rather than the string key?


3. It is not documented what happens when the $columnKey and/or
$indexKey are not present in the nested array, could this be added?
The current implementation appears to not include an item in the
resulting array if $columnKey is not present. If $columnKey is present
but $indexKey is not, a 0-based index is used in the current
implementation.

I've added Example #4 to illustrate this.

4. An example of what happens when the resulting array has overlapping
keys would not go amiss (though the behaviour is obvious).

I've added Example #5 for this.

5. Regarding the alias, so long as we clearly mention the word "pluck"
(or "array_pluck") on the documentation page, folks coming from other
languages should be able to find our implementation.  I'm not sure we
really need it as an actual alias, but have no strong opinion one way
or the other.

My opinion on this isn't strong, either. I've already given my rationale in another post to this thread, but if most people want the alias removed, I'm okay with that.

Overall, I'm liking this simple addition to the array library.




--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to