Re: A php bug or?..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 8, 2011 at 16:41, Andre Polykanine <andre@xxxxxxxx> 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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux