On Wed, 26 Oct 2005, Ilia Alshanetsky wrote:
Greg Beaver wrote:
amen, this behavior makes no sense even though sizeof() is an alias to
count(). sizeof('this') and sizeof('this long thing') are both 1, which
makes no sense. I would go so far as to say a E_NOTICE is more
appropriate than E_STR
Ilia Alshanetsky wrote:
> Greg Beaver wrote:
>
>>amen, this behavior makes no sense even though sizeof() is an alias to
>>count(). sizeof('this') and sizeof('this long thing') are both 1, which
>>makes no sense. I would go so far as to say a E_NOTICE is more
>>appropriate than E_STRICT - you sho
Greg Beaver wrote:
> amen, this behavior makes no sense even though sizeof() is an alias to
> count(). sizeof('this') and sizeof('this long thing') are both 1, which
> makes no sense. I would go so far as to say a E_NOTICE is more
> appropriate than E_STRICT - you should only be using count() for
Jani Taskinen wrote:
> On Wed, 26 Oct 2005, Sebastian wrote:
>
> [clip]
>
>> Good code is code that's easy to debug (among other things). By
>> removing the "Invalid argument supplied for foreach()" warning without
>> providing mechanisms to turn it on, debugging code will be more
>> difficult.
>
On Wed, 26 Oct 2005, Sebastian wrote:
[clip]
Good code is code that's easy to debug (among other things). By
removing the "Invalid argument supplied for foreach()" warning without
providing mechanisms to turn it on, debugging code will be more
difficult.
[clip]
You got to the point here. I
Sebastian wrote:
Good code is code that's easy to debug (among other things). By
removing the "Invalid argument supplied for foreach()" warning without
providing mechanisms to turn it on, debugging code will be more
difficult. Logically speaking, when does it make sense to iterate over
something
> Any opinions?
Good code is code that's easy to debug (among other things). By
removing the "Invalid argument supplied for foreach()" warning without
providing mechanisms to turn it on, debugging code will be more
difficult. Logically speaking, when does it make sense to iterate over
something th
> IMPW (In my PHP world) null represents an undefined variable. Trying to
> iterate over it could be a programming mistake. Like iterating over a
> scalar value. I normally use foreach ((array)$var as $value) if $var is
> of "mixed" type which also catches null. But most of the time I'm more
> comf
Marcus Boerger wrote:
i would like to change foreach a tiny bit. Actually i don't like the
warning when using foreach with null.
The way we use NULL in PHP should result in no warning here. The patch for
Can you elaborate on the "The way we use NULL in PHP" part?
IMPW (In my PHP world) null