Home
last modified time | relevance | path

Searched refs:shuffle (Results 1 – 18 of 18) sorted by relevance

/PHP-7.2/ext/standard/tests/array/
H A Dshuffle_basic1.phpt5 /* Prototype : bool shuffle(array $array_arg)
6 * Description: Randomly shuffle the contents of an array
11 * Test behaviour of shuffle when an array with default keys
14 * before and after shuffle() function is applied on it
25 /* Testing shuffle() function with array of integers */
32 echo "\n-- return value from shuffle() function --\n";
33 var_dump( shuffle($array_arg_int) ); // prints the return value from shuffle() function
38 /* Testing shuffle() function with array of strings */
46 var_dump( shuffle($array_arg_strings) ); // prints the return value from shuffle() function
78 -- return value from shuffle() function --
[all …]
H A Dshuffle_basic2.phpt5 /* Prototype : bool shuffle(array $array_arg)
6 * Description: Randomly shuffle the contents of an array
11 * Test behaviour of shuffle when an associative array is
14 * before and after shuffle() function is applied on it
26 // printing the input array before the shuffle operation
30 // applying shuffle() function on the input array
31 echo "\n-- return value from shuffle() function --\n";
32 var_dump( shuffle($array_arg) ); // prints the return value from shuffle() function
40 *** Testing shuffle() : with associative array ***
42 -- input array before shuffle() function is applied --
[all …]
H A Dshuffle_error.phpt2 Test shuffle() function : error conditions
5 /* Prototype : bool shuffle(array $array_arg)
6 * Description: Randomly shuffle the contents of an array
10 /* Test shuffle() to see that warning messages are emitted
14 echo "*** Testing shuffle() : error conditions ***\n";
17 echo "\n-- Testing shuffle() function with Zero arguments --\n";
18 var_dump( shuffle() );
24 var_dump( shuffle($array_arg, $extra_arg) );
27 // by above shuffle() function calls
34 *** Testing shuffle() : error conditions ***
[all …]
H A Dshuffle_variation1.phpt2 Test shuffle() function : usage variations - unexpected values for 'array_arg' argument
5 /* Prototype : bool shuffle(array $array_arg)
6 * Description: Randomly shuffle the contents of an array
11 * Test behaviour of shuffle() when unexpected values are passed for 'array_arg'
15 echo "*** Testing shuffle() : with unexpected values for 'array_arg' argument ***\n";
82 // loop through the array to test shuffle() function
87 var_dump( shuffle($value) );
97 *** Testing shuffle() : with unexpected values for 'array_arg' argument ***
121 Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d
146 Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
[all …]
H A Darray_shuffle_basic.phpt6 * proto bool shuffle ( array &$array )
12 var_dump(shuffle($a));
15 var_dump(shuffle($a));
18 var_dump(shuffle($a));
21 var_dump(shuffle($a));
24 var_dump(shuffle($a));
27 var_dump(shuffle($a));
31 shuffle($arr1);
35 shuffle($bigarray);
39 shuffle($bigarray);
H A Dshuffle_variation2.phpt2 Test shuffle() function : usage variation - with MultiDimensional array
5 /* Prototype : bool shuffle(array $array_arg)
6 * Description: Randomly shuffle the contents of an array
11 * Test behaviour of shuffle() function when multi-dimensional array is
15 echo "*** Testing shuffle() : with multi-dimensional array ***\n";
29 // calling shuffle() function with multi-dimensional array
30 var_dump( shuffle($array_arg) );
35 // looping to test shuffle() with each sub-array in the multi-dimensional array
40 var_dump( shuffle($array_arg[$i]) );
49 *** Testing shuffle() : with multi-dimensional array ***
[all …]
H A Dshuffle_variation5.phpt2 Test shuffle() function : usage variation - arrays with diff heredoc strings
5 /* Prototype : bool shuffle(array $array_arg)
6 * Description: Randomly shuffle the contents of an array
11 * Test behaviour of shuffle() when an array of heredoc strings is passed to
15 echo "*** Testing shuffle() : with array containing heredoc strings ***\n";
65 // test shuffle() with array containing heredoc strings as values
67 var_dump( shuffle($heredoc_array) );
71 // test shuffle() with array containing heredoc strings as its keys
73 var_dump( shuffle($heredoc_asso_array) );
80 \*\*\* Testing shuffle\(\) : with array containing heredoc strings \*\*\*
H A Dshuffle_variation3.phpt2 Test shuffle() function : usage variation - arrays with diff types of values
5 /* Prototype : bool shuffle(array $array_arg)
6 * Description: Randomly shuffle the contents of an array
11 * Test behaviour of shuffle() function when arrays having different
15 echo "*** Testing shuffle() : arrays with diff types of values ***\n";
51 // looping to test shuffle() with each sub-array in the $array_arg array
52 echo "\n*** Testing shuffle() with arrays having different types of values ***\n";
56 var_dump( shuffle($arr) );
65 *** Testing shuffle() : arrays with diff types of values ***
67 *** Testing shuffle() with arrays having different types of values ***
H A Dshuffle_variation4.phpt2 Test shuffle() function : usage variation - associative arrays with diff types of values
5 /* Prototype : bool shuffle(array $array_arg)
6 * Description: Randomly shuffle the contents of an array
11 * Test behaviour of shuffle() function when associative arrays
15 echo "*** Testing shuffle() : associative arrays with diff types of values ***\n";
54 // looping to test shuffle() with each sub-array in the $array_arg array
55 echo "\n*** Testing shuffle() with arrays having different types of values ***\n";
59 var_dump( shuffle($arr) );
68 *** Testing shuffle() : associative arrays with diff types of values ***
70 *** Testing shuffle() with arrays having different types of values ***
H A Dbug24897.phpt2 Bug #24897 (inconsistent behaviour or shuffle() & array_multisort())
6 shuffle($a);
H A Dusort_variation11.phpt14 shuffle($array);
/PHP-7.2/ext/standard/tests/strings/
H A D004.phpt2 Testing randomization of shuffle() and str_shuffle().
16 shuffle($p);
22 stats('shuffle', $a);
35 shuffle
/PHP-7.2/ext/spl/tests/
H A Dheap_005.phpt6 shuffle($input);
H A Dheap_006.phpt6 shuffle($input);
H A Dheap_003.phpt21 shuffle($in);
/PHP-7.2/ext/standard/
H A Dphp_array.h59 PHP_FUNCTION(shuffle);
H A Dbasic_functions.c3314 PHP_FE(shuffle, arginfo_shuffle)
H A Darray.c3035 PHP_FUNCTION(shuffle) argument

Completed in 59 milliseconds