Bug #11604: count() error codes
| From: | vroemisse at home dot nl | Date: | Thu, 21 Jun 2001 15:17:33 +0000 |
| Subject: | Bug #11604: count() error codes | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-57543@lists.php.net to get a copy of this message | ||
From: vroemisse@home.nl
Operating system: Linux/any
PHP version: 4.0.5
PHP Bug Type: Feature/Change Request
Bug description: count() error codes
count($var) can return 0 if $var is not set and 1 if $var is not an array.
In my view these overlap with proper return values - I can have an empty array and I can have an
array with only 1 element. Actually, I often do.
Please make count($var) return -1 and -2 in these cases so I can reliably determine what's the
situation with $var.
--
Edit Bug report at: http://bugs.php.net/?id=11604&edit=1