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

/PHP_5_4/ext/standard/
H A Darray.c3954 /* {{{ proto mixed array_rand(array input [, int num_req])
3959 long randval, num_req = 1; local
3966 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &input, &num_req) == FAILURE) {
3973 if (num_req <= 0 || num_req > num_avail) {
3980 if (num_req > 1) {
3981 array_init_size(return_value, num_req);
3986 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_EXISTANT) {
3990 if ((double) (randval / (PHP_RAND_MAX + 1.0)) < (double) num_req / (double) num_avail) {
4006 num_req
[all...]

Completed in 10 milliseconds