Lines Matching refs:count

2 Test count() function
5 echo "*** Testing basic functionality of count() function ***\n";
9 print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n";
10 print "COUNT_RECURSIVE: should be 8, is ".count($arr, COUNT_RECURSIVE)."\n";
14 print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n";
15 print "COUNT_RECURSIVE: should be 6, is ".count($arr, COUNT_RECURSIVE)."\n";
18 print "COUNT_NORMAL: should be 2, is ".count(array("a", array("b")))."\n";
23 print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n";
24 print "COUNT_RECURSIVE: should be 13, is ".count($arr, COUNT_RECURSIVE)."\n";
26 echo "\n*** Testing possible variations of count() function on arrays ***";
45 print "COUNT_NORMAL is ".count($count_value, COUNT_NORMAL)."\n";
46 print "COUNT_RECURSIVE is ".count($count_value, COUNT_RECURSIVE)."\n";
50 print "\n-- Testing count() on an empty sub-array --\n";
52 print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n";
53 print "COUNT_RECURSIVE: should be 5, is ".count($arr, COUNT_RECURSIVE)."\n";
55 echo "\n-- Testing count() on objects with Countable interface --\n";
61 public function count() {
67 print "COUNT_NORMAL: should be 3, is ".count($obj)."\n";
70 echo "\n-- Testing count() on resource type --\n";
76 var_dump(count($arr_resource));
78 echo "\n-- Testing count() on arrays containing references --\n";
83 var_dump(count($arr, COUNT_NORMAL));
85 var_dump(count($arr, COUNT_RECURSIVE));
92 *** Testing basic functionality of count() function ***
105 *** Testing possible variations of count() function on arrays ***
138 -- Testing count() on an empty sub-array --
142 -- Testing count() on objects with Countable interface --
145 -- Testing count() on resource type --
148 -- Testing count() on arrays containing references --