Added array_pick($array) function: gets value of random array item. #142

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
Contributor

hikari-no-yume commented Jul 23, 2012

I'll make an internals email about this in a moment, see that for reasoning/arguments/whatever.

Doesn't array_rand($ary, $count = 1) provides the same functionality ?
http://ch2.php.net/manual/en/function.array-rand.php

Contributor

hikari-no-yume commented Aug 23, 2012

No, you mean $array[array_rand($array)];

Contributor

lstrojny commented Sep 18, 2012

Please open an RFC for this addition.

Contributor

weltling commented Sep 19, 2012

The code works well on windows but some tests wouldn't harm anyway ;)

Owner

dsp commented Oct 23, 2012

Any update on this? I personally don't think we should add yet another method for something. Going to close it for the moment, feel free to reopen if there is a valid point (and maybe an RFC).

@dsp dsp closed this Oct 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment