Lines Matching refs:array_rand
2 Test array_rand() function : usage variation - invalid values for 'req_num' parameter
6 * Test behaviour of array_rand() function when associative array and
11 echo "*** Testing array_rand() : with invalid values for 'req_num' ***\n";
21 // Testing array_rand() function with various invalid 'req_num' values
24 var_dump( array_rand($input) ); // with default $num_req value
26 var_dump( array_rand($input, 1) ); // with valid $num_req value
31 var_dump( array_rand($input, 0) ); // with $num_req=0
38 var_dump( array_rand($input, -1) ); // with $num_req=-1
45 var_dump( array_rand($input, -2) ); // with $num_req=-2
52 var_dump( array_rand($input, 13) ); // with $num_req=13
59 *** Testing array_rand() : with invalid values for 'req_num' ***
68 array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($arra…
71 array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($arra…
74 array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($arra…
77 array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($arra…