Lines Matching refs:n

11 echo "*** Testing basic functionality of count() function ***\n";
12 print "-- Testing NULL --\n";
14 print "COUNT_NORMAL: should be 0, is ".count($arr, COUNT_NORMAL)."\n";
15 print "COUNT_RECURSIVE: should be 0, is ".count($arr, COUNT_RECURSIVE)."\n";
17 print "-- Testing arrays --\n";
19 print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n";
20 print "COUNT_RECURSIVE: should be 8, is ".count($arr, COUNT_RECURSIVE)."\n";
22 print "-- Testing hashes --\n";
24 print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n";
25 print "COUNT_RECURSIVE: should be 6, is ".count($arr, COUNT_RECURSIVE)."\n";
27 print "-- Testing strings --\n";
28 print "COUNT_NORMAL: should be 1, is ".count("string", COUNT_NORMAL)."\n";
29 print "COUNT_RECURSIVE: should be 1, is ".count("string", COUNT_RECURSIVE)."\n";
31 print "-- Testing various types with no second argument --\n";
32 print "COUNT_NORMAL: should be 1, is ".count("string")."\n";
33 print "COUNT_NORMAL: should be 2, is ".count(array("a", array("b")))."\n";
37 print "-- Testing really cool arrays --\n";
38 print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n";
39 print "COUNT_RECURSIVE: should be 13, is ".count($arr, COUNT_RECURSIVE)."\n";
41 echo "\n*** Testing possible variations of count() function on arrays ***";
59 echo "\n-- Iteration $i --\n";
60 print "COUNT_NORMAL is ".count($count_value, COUNT_NORMAL)."\n";
61 print "COUNT_RECURSIVE is ".count($count_value, COUNT_RECURSIVE)."\n";
67 print "\n-- Testing count() on constants with no second argument --\n";
68 print "COUNT_NORMAL: should be 1, is ".count(100)."\n";
69 print "COUNT_NORMAL: should be 1, is ".count(-23.45)."\n";
71 print "\n-- Testing count() on NULL and Unset variables --\n";
72 print "COUNT_NORMAL: should be 0, is ".count(NULL)."\n";
73 print "COUNT_NORMAL: should be 1, is ".count("")."\n";
74 print "COUNT_NORMAL: should be 0, is ".@count($a)."\n";
77 print "\n-- Testing count() on an empty sub-array --\n";
79 print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n";
80 print "COUNT_RECURSIVE: should be 5, is ".count($arr, COUNT_RECURSIVE)."\n";
82 echo "\n-- Testing count() on objects with Countable interface --\n";
94 print "COUNT_NORMAL: should be 3, is ".count($obj)."\n";
97 echo "\n-- Testing count() on resource type --\n";
105 echo "\n-- Testing count() on arrays containing references --\n";
117 echo "\n-- Testing error conditions --";