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

/PHP_5_5/ext/standard/
H A Darray.c3999 /* {{{ proto mixed array_rand(array input [, int num_req])
4004 long randval, num_req = 1; local
4011 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &input, &num_req) == FAILURE) {
4018 if (num_req <= 0 || num_req > num_avail) {
4025 if (num_req > 1) {
4026 array_init_size(return_value, num_req);
4031 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) {
4035 if ((double) (randval / (PHP_RAND_MAX + 1.0)) < (double) num_req / (double) num_avail) {
4051 num_req
[all...]

Completed in 11 milliseconds