Re: [PHP] A php bug or?..

2011-08-08 Thread Daniel P. Brown
On Mon, Aug 8, 2011 at 16:41, Andre Polykanine 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. I

Re: [PHP] A php bug or?..

2011-08-08 Thread Stuart Dallas
On 8 Aug 2011, at 21:41, Andre Polykanine wrote: > DPB> does it return the number of characters within a string --- instead, > DPB> as you likely know, you'd use strlen(). > > For sure. But I'm asking: why it doesn't return 0 if it is not an array? > Logically: no array - no items! The ma

Re: [PHP] A php bug or?..

2011-08-08 Thread Andre Polykanine
Hello Daniel, DPB> does it return the number of characters within a string --- instead, DPB> as you likely know, you'd use strlen(). For sure. But I'm asking: why it doesn't return 0 if it is not an array? Logically: no array - no items! -- With best regards from Ukraine, Andre Sk

Re: [PHP] A php bug or?..

2011-08-08 Thread Daniel P. Brown
On Mon, Aug 8, 2011 at 16:20, Andre Polykanine wrote: > Hi everyone, > >                            As we all know, count() returns 1 if the variable > is not an array. > Question is: why in the world does it this? If a variable is *notA* an array, > it contains *zero* array elements. > You can

Re: [PHP] A php bug or?..

2011-08-08 Thread Simon J Welsh
On 9/08/2011, at 8:20 AM, Andre Polykanine wrote: > Hi everyone, > >As we all know, count() returns 1 if the variable > is not an array. > Question is: why in the world does it this? If a variable is *notA* an array, > it contains *zero* array elements. > You can ans