Searched defs:num_req (Results 1 - 1 of 1) sorted by relevance

/PHP_5_6/ext/standard/
H A Darray.c3860 /* {{{ proto mixed array_rand(array input [, int num_req])
3865 long randval, num_req = 1; local
3872 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &input, &num_req) == FAILURE) {
3879 if (num_req <= 0 || num_req > num_avail) {
3886 if (num_req > 1) {
3887 array_init_size(return_value, num_req);
3892 while (num_req && (key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(input), &string_key, &string_key_len, &num_key, 0, &pos)) != HASH_KEY_NON_EXISTENT) {
3896 if ((double) (randval / (PHP_RAND_MAX + 1.0)) < (double) num_req / (double) num_avail) {
3912 num_req
[all...]

Completed in 11 milliseconds