Lines Matching refs:array
2 Test array_rand() function : usage variation - with MultiDimensional array
5 /* Prototype : mixed array_rand(array $input [, int $num_req])
6 * Description: Return key/keys for random entry/entries in the array
7 * Source code: ext/standard/array.c
11 * Test behaviour of array_rand() function when multi-dimensional array
15 echo "*** Testing array_rand() : with multi-dimensional array ***\n";
17 // initialise the multi-dimensional array
18 $input = array(
19 // array with int values
20 /*1*/ array(1, 2, 0, -0, -1, -2),
22 // array with float values
23 array(1.23, -1.23, 0.34, -0.34, 0e2, 2e-3, -2e2, -40e-2),
25 // array with single quoted strings
26 /*3*/ array('one', '123numbers', 'hello\tworld', 'hello world\0', '12.34floatnum'),
28 // array with double quoted strings
29 array("one","123numbers", "hello\tworld", "hello world\0", "12.34floatnum"),
31 // array with bool values
32 /*5*/ array(true, TRUE, FALSE, false, TrUe, FaLsE),
34 // array with hexa values
35 array(0x123, -0x123, 0xabc, 0xABC, 0xab),
37 // array with null values
38 /*7*/ array(null, NULL, "\0", Null, NuLl)
45 // calling array_rand() function with multi-dimensional array
48 // looping to test array_rand() with each sub-array in the multi-dimensional array
61 *** Testing array_rand() : with multi-dimensional array ***
62 array(3) {
75 array(3) {
86 array(3) {
97 array(3) {
108 array(3) {
119 array(3) {
130 array(3) {
141 array(3) {