Re: [VOTE] array_column() function
| From: | Herman Radtke | Date: | Tue, 15 Jan 2013 06:12:23 +0000 |
| Subject: | Re: [VOTE] array_column() function | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64967@lists.php.net to get a copy of this message | ||
> If it is called "array_pluck" it should remove the data in question from the
> original array. (I'm not saying that is a desirable feature here, I'm just
> saying that makes more sense based on the meaning of the name you seem to
> prefer.)
Why do you think pluck is destructive? In most examples I have come
across it merely 'plucks' a certain key from a dictionary and does so
in a way that does not modify the original dictionary.
Sources:
Underscore.js - http://documentcloud.github.com/underscore/#pluck
Rails - http://apidock.com/rails/ActiveRecord/Calculations/pluck
Python example: http://stackoverflow.com/questions/9816545/pluck-in-python
--
Herman Radtke
@hermanradtke | http://hermanradtke.com