Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

hikari-no-yume
Copy link
Contributor

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

@ltouroumov
Copy link

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

@hikari-no-yume
Copy link
Contributor Author

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

@lstrojny
Copy link
Contributor

Please open an RFC for this addition.

@weltling
Copy link
Contributor

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

@dsp
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants