Searched refs:num_req (Results 1 – 11 of 11) sorted by relevance
/PHP-5.4/ext/standard/tests/array/ |
H A D | array_rand_variation5.phpt | 27 // with valid num_req values 30 echo"\n-- With num_req = 1 --\n"; 33 // with invalid num_req value 34 echo"\n-- With num_req = 0 --\n"; 36 echo"\n-- With num_req = -1 --\n"; 38 echo"\n-- With num_req = -2 --\n"; 49 -- With default num_req value -- 52 -- With num_req = 1 -- 55 -- With num_req = 0 -- 60 -- With num_req = -1 -- [all …]
|
H A D | array_rand_variation4.phpt | 77 With num_req = 1 80 With num_req = 2 93 With num_req = 1 96 With num_req = 2 109 With num_req = 1 112 With num_req = 2 125 With num_req = 1 128 With num_req = 2 141 With num_req = 1 144 With num_req = 2 [all …]
|
H A D | array_rand_variation6.phpt | 5 /* Prototype : mixed array_rand(array $input [, int $num_req]) 57 echo "\n-- with num_req = 1 --\n"; 60 echo "\n-- with num_req = 3 --\n"; 63 echo "\n-- with num_req = 6 --\n"; 75 -- with num_req = 1 -- 78 -- with num_req = 3 -- 88 -- with num_req = 6 --
|
H A D | array_rand_basic1.phpt | 5 /* Prototype : mixed array_rand(array $input [, int $num_req]) 17 // Initialise the 'input' and 'num_req' variables 19 $num_req = 6; 23 var_dump( array_rand($input,$num_req) );
|
H A D | array_rand_basic2.phpt | 5 /* Prototype : mixed array_rand(array $input [, int $num_req]) 17 // Initialise the 'input' and 'num_req' variables 24 $num_req = 6; 28 var_dump( array_rand($input,$num_req) );
|
H A D | array_rand_error.phpt | 5 /* Prototype : mixed array_rand(array input [, int num_req]) 19 $num_req = 10; 21 var_dump( array_rand($input,$num_req, $extra_arg) );
|
H A D | array_rand_variation3.phpt | 5 /* Prototype : mixed array_rand(array $input [, int $num_req]) 42 // initialise 'num_req' variable 43 $num_req = 3; 46 var_dump( array_rand($input, $num_req) );
|
H A D | array_rand_variation2.phpt | 2 Test array_rand() function : usage variations - unexpected values for 'num_req' parameter 5 /* Prototype : mixed array_rand(array input [, int num_req]) 11 * Test array_rand() with different types of values other than int passed to 'num_req' argument 15 echo "*** Testing array_rand() : unexpected values for 'num_req' parameter ***\n"; 79 // loop through each element of the array for different values for 'num_req' argument 90 *** Testing array_rand() : unexpected values for 'num_req' parameter ***
|
H A D | array_rand_variation1.phpt | 5 /* Prototype : mixed array_rand(array input [, int num_req]) 18 $num_req = 10; 90 var_dump( array_rand($value,$num_req) );
|
/PHP-5.4/ext/standard/ |
H A D | array.c | 3959 long randval, num_req = 1; in PHP_FUNCTION() local 3966 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &input, &num_req) == FAILURE) { in PHP_FUNCTION() 3973 if (num_req <= 0 || num_req > num_avail) { in PHP_FUNCTION() 3980 if (num_req > 1) { in PHP_FUNCTION() 3981 array_init_size(return_value, num_req); in PHP_FUNCTION() 3986 …while (num_req && (key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(input), &string_key, &string… in PHP_FUNCTION() 3990 if ((double) (randval / (PHP_RAND_MAX + 1.0)) < (double) num_req / (double) num_avail) { in PHP_FUNCTION() 4006 num_req--; in PHP_FUNCTION()
|
H A D | basic_functions.c | 570 ZEND_ARG_INFO(0, num_req)
|
Completed in 52 milliseconds