diff options
author | Sander Roobol <sander@php.net> | 2002-03-21 14:18:30 +0000 |
---|---|---|
committer | Sander Roobol <sander@php.net> | 2002-03-21 14:18:30 +0000 |
commit | a15c9a31ebc7041bbe902e3fd0d9947eff4f4b06 (patch) | |
tree | abc9c01aaf0cf8ce86f32368549f97db7ef83f6a /ext/standard/tests/array/count_recursive.phpt | |
parent | abb7905c0c90108057a0a6af34a1b07924ea9f14 (diff) | |
download | php-git-a15c9a31ebc7041bbe902e3fd0d9947eff4f4b06.tar.gz |
Added tests for pow()'ing with broken exponents and some additional test
for count()'ing arrays.
Diffstat (limited to 'ext/standard/tests/array/count_recursive.phpt')
-rw-r--r-- | ext/standard/tests/array/count_recursive.phpt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/standard/tests/array/count_recursive.phpt b/ext/standard/tests/array/count_recursive.phpt index a6b7ee4afa..1dcd845eaa 100644 --- a/ext/standard/tests/array/count_recursive.phpt +++ b/ext/standard/tests/array/count_recursive.phpt @@ -26,6 +26,12 @@ print "COUNT_RECURSIVE: should be 1, is ".count("string", COUNT_RECURSIVE)."\n"; print "Testing various types with no second argument.\n"; print "COUNT_NORMAL: should be 1, is ".count("string")."\n"; print "COUNT_NORMAL: should be 2, is ".count(array("a", array("b")))."\n"; + +$arr = array('a'=>array(NULL, NULL, NULL), 1=>array(NULL=>1, 1=>NULL), + array(array(array(array(array(NULL)))))); +print "Testing really cool arrays ;)\n"; +print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n"; +print "COUNT_RECURSIVE: should be 13, is ".count($arr, COUNT_RECURSIVE)."\n"; ?> --EXPECT-- Testing NULL... @@ -42,4 +48,7 @@ COUNT_NORMAL: should be 1, is 1 COUNT_RECURSIVE: should be 1, is 1 Testing various types with no second argument. COUNT_NORMAL: should be 1, is 1 -COUNT_NORMAL: should be 2, is 2 +COUNT_NORMAL: should be 2, is 2 +Testing really cool arrays ;) +COUNT_NORMAL: should be 3, is 3 +COUNT_RECURSIVE: should be 13, is 13 |