[PHP-DEV] Bug #1348 Updated: count() can't identify a non-array variable correctly From: Bug Database (php-dev <email protected>)
Date: 04/24/99

ID: 1348
Updated by: rasmus
Reported By: mike24 <email protected>
Status: Closed
Bug Type: Misbehaving function
Assigned To:
Comments:

I don't see how 1 is inaccurate. Think of a variable as a 1-element array. count() was never designed to distinguish between arrays and variables. It was simply designed to tell you how many elements something contains. Having it return -1 would be counter-intuitive.

Full Bug description available at: http://bugs.php.net?id=1348

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>