summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/count_recursive.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/array/count_recursive.phpt')
-rw-r--r--ext/standard/tests/array/count_recursive.phpt14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/tests/array/count_recursive.phpt b/ext/standard/tests/array/count_recursive.phpt
index 16c754e54f..f7e79afb6b 100644
--- a/ext/standard/tests/array/count_recursive.phpt
+++ b/ext/standard/tests/array/count_recursive.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test count() function
+Test count() function
--SKIPIF--
<?php if (!extension_loaded("spl")) die("skip no SPL extension"); ?>
--FILE--
@@ -48,9 +48,9 @@ $count_array = array(
array( "a" => 1, "b" => -2.344, "b" => "string", "c" => NULL, "d" => -2.344),
array( 4 => 1, 3 => -2.344, "3" => "string", "2" => NULL,
1 => -2.344, array()),
- array( TRUE => TRUE, FALSE => FALSE, "" => "", " " => " ",
+ array( TRUE => TRUE, FALSE => FALSE, "" => "", " " => " ",
NULL => NULL, "\x000" => "\x000", "\000" => "\000"),
- array( NULL, 1.23 => "Hi", "string" => "hello",
+ array( NULL, 1.23 => "Hi", "string" => "hello",
array("" => "World", "-2.34" => "a", "0" => "b"))
);
@@ -58,14 +58,14 @@ $i = 0;
foreach ($count_array as $count_value) {
echo "\n-- Iteration $i --\n";
print "COUNT_NORMAL is ".count($count_value, COUNT_NORMAL)."\n";
- print "COUNT_RECURSIVE is ".count($count_value, COUNT_RECURSIVE)."\n";
+ print "COUNT_RECURSIVE is ".count($count_value, COUNT_RECURSIVE)."\n";
$i++;
}
/* Testing count() by passing constant with no second argument */
print "\n-- Testing count() on constants with no second argument --\n";
-print "COUNT_NORMAL: should be 1, is ".count(100)."\n";
+print "COUNT_NORMAL: should be 1, is ".count(100)."\n";
print "COUNT_NORMAL: should be 1, is ".count(-23.45)."\n";
print "\n-- Testing count() on NULL and Unset variables --\n";
@@ -106,13 +106,13 @@ echo "\n-- Testing count() on arrays containing references --\n";
$arr = array(1, array("a", "b", "c"));
$arr[2] = &$arr[1];
-$mode_arr = array( COUNT_NORMAL, COUNT_RECURSIVE, 0, 1, -1, -1.45, 2, TRUE,
+$mode_arr = array( COUNT_NORMAL, COUNT_RECURSIVE, 0, 1, -1, -1.45, 2, TRUE,
FALSE, NULL);
for( $i =0; $i < count( $mode_arr ); $i++) {
echo "For mode '$mode_arr[$i]' count is => ";
var_dump(count($arr, $mode_arr[$i]));
}
-
+
echo "\n-- Testing error conditions --";
var_dump( count() ); // No. of args = 0