On 20/08/12 18:27, Levi Morrison wrote:
You are basically asking to alias array_filter with "array_delete". That is
a very slippery slope. I think array_filter is a very obvious choice
to remove something from an array. The "filter" function/method is common
in functional languages (and functional frameworks like Underscore).
This about sums up my opinion on deleting things by value on a PHP array.
** Me and Levi had a private email back-and-forth about this. Like many
things here, this discussion has become a pseudo-argument, and it's
unclear whether people actually think it's a good idea or not. So let's
make an RFC (I think array_delete($array, $value, $all=false), mirrors
Python's replace-one-only by default), vote on it, and that can decide
things. So we can avoid argument. Don't like the syntax? Vote against
it, but I don't see how it could be much better.
--
Andrew Faulds
http://ajf.me/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php