On Mon, Aug 8, 2011 at 16:41, Andre Polykanine <an...@oire.org> wrote: > > For sure. But I'm asking: why it doesn't return 0 if it is not an array? > Logically: no array - no items!
No, actually, if it's a string, it's a single item --- thus, 1. The documentation should probably reflect that as well. It wasn't always this way before, though --- in older version of PHP5 it returned 0, and in all versions of PHP4 it did as well. Also, keep in mind that a blank string still constitutes a string and will return 1, but null or nonexistent variables will still return 0. -- </Daniel P. Brown> Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php