3 /* Prototype : mixed count_chars ( string $string [, int $mode ] )
4 * Description: Return information about characters used in a string
5 * Source code: ext/standard/string.c
8 echo "*** Testing count_chars() function: with unexpected inputs for 'mode' argument ***\n";
10 //get an unset variable
11 $unset_var = 'string_val';
18 // array with different values for $input
37 array(1, 2, 3, 4, 5, 6, 7, 8, 9),
56 /* 24 */ new sample(),
59 /* 25 */ @$undefined_var,
65 // loop through with each element of the $inputs array to test count_chars() function
66 // with unexepcted values for the 'mode' argument
68 $string = "Return information about characters used in a string";
69 foreach($inputs as $input) {
70 echo "-- Iteration $count --\n";
71 // only list characters with a frequency > 0
72 var_dump(is_array(count_chars($string, $input)));