[PHP-DEV] Bug #11604: count() error codes From: vroemisse <email protected>
Date: 06/21/01

From: vroemisse <email protected>
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

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>