I think we should be keeping the warning (i.e. -1 for the change).
I don't see a reason why overloaded objects can't expose an API of an
empty array() instead of changing this behavior to fit the
implementation. But even if it weren't so, there has to be a good
reason to change the general case
Hello Jochem,
Thursday, October 27, 2005, 12:49:57 PM, you wrote:
> Jani Taskinen wrote:
>> On Thu, 27 Oct 2005, Jochem Maas wrote:
>>
>>> advanced code should be checking vars properly before using them and,
>>> well,
>>> for any given foreach loop there is often enough an 'if
>>> (!count($ar
Jani Taskinen wrote:
On Thu, 27 Oct 2005, Jochem Maas wrote:
advanced code should be checking vars properly before using them and,
well,
for any given foreach loop there is often enough an 'if
(!count($array))'-like
statement to take care of the 'empty' case. and in cases when speed is
very i
On Thu, 27 Oct 2005, Hannes Magnusson wrote:
> On 10/27/05, Derick Rethans <[EMAIL PROTECTED]> wrote:
> >
> > On Wed, 26 Oct 2005, Ilia Alshanetsky wrote:
> >
> > > IMHO this is a bad idea, if you really wanted to support NULL in a
> > > particular case you, as a developer could do:
> > > php -r '
On Thu, 27 Oct 2005, Jochem Maas wrote:
advanced code should be checking vars properly before using them and, well,
for any given foreach loop there is often enough an 'if (!count($array))'-like
statement to take care of the 'empty' case. and in cases when speed is very
important
..and wh
On 10/27/05, Derick Rethans <[EMAIL PROTECTED]> wrote:
>
> On Wed, 26 Oct 2005, Ilia Alshanetsky wrote:
>
> > IMHO this is a bad idea, if you really wanted to support NULL in a
> > particular case you, as a developer could do:
> > php -r '$n=NULL; foreach((array)$n as $v);'
> >
> > Making NULL usag
On Wed, 26 Oct 2005, Ilia Alshanetsky wrote:
> IMHO this is a bad idea, if you really wanted to support NULL in a
> particular case you, as a developer could do:
> php -r '$n=NULL; foreach((array)$n as $v);'
>
> Making NULL usage transparent where array is expects will lead to
> difficult to debu
Ilia Alshanetsky wrote:
IMHO this is a bad idea, if you really wanted to support NULL in a
particular case you, as a developer could do:
php -r '$n=NULL; foreach((array)$n as $v);'
Making NULL usage transparent where array is expects will lead to
difficult to debug code.
hi :-)
the warning fo
IMHO this is a bad idea, if you really wanted to support NULL in a
particular case you, as a developer could do:
php -r '$n=NULL; foreach((array)$n as $v);'
Making NULL usage transparent where array is expects will lead to
difficult to debug code.
-1 for removing the warning.
Ilia
--
PHP Inter
Hello Christian,
Tuesday, October 25, 2005, 7:28:09 PM, you wrote:
> Ants Aasma wrote:
>> +-0 on the foreach issue, but with the SPL Iterators I can see where
>> Marcus is coming from.
> Ok, I can see the reason behind it now as casting to array is not an
> option for objects with SPL Iterator
Ants Aasma wrote:
+-0 on the foreach issue, but with the SPL Iterators I can see where
Marcus is coming from.
Ok, I can see the reason behind it now as casting to array is not an
option for objects with SPL Iterators. One little side-note: Programmers
will still have to do an if($obj) check i
Antony Dovgal wrote:
On 25.10.2005 19:39, Ants Aasma wrote:
It currently is equal:
$ php -r 'var_dump(null == array()); var_dump((array) null);'
bool(true)
array(0) {
}
No, there aren't equal.
Use === and you'll see the difference.
At least the manual says that the == operator is named equa
+1 as well if and only if this applies to IS_NULL
On Tue, 2005-10-25 at 02:45 +0400, Antony Dovgal wrote:
> I'd say silently ignoring it and moving along is fine here.
> Only if the var IS_NULL, but this is the case.
>
> So I'm +1.
>
> On 25.10.2005 02:22, Marcus Boerger wrote:
> > Hello interna
On 25.10.2005 19:39, Ants Aasma wrote:
It currently is equal:
$ php -r 'var_dump(null == array()); var_dump((array) null);'
bool(true)
array(0) {
}
No, there aren't equal.
Use === and you'll see the difference.
--
Wbr,
Antony Dovgal
--
PHP Internals - PHP Runtime Development Mailing List
To
It currently is equal:
$ php -r 'var_dump(null == array()); var_dump((array) null);'
bool(true)
array(0) {
}
Ants
Jani Taskinen wrote:
Will the patch make it silently ignore also empty string and 0?
If not, -1. (what's with null being suddenly equal to empty array? :)
--Jani
On Tue
Will the patch make it silently ignore also empty string and 0?
If not, -1. (what's with null being suddenly equal to empty array? :)
--Jani
On Tue, 25 Oct 2005, Marcus Boerger wrote:
Hello internals,
i would like to change foreach a tiny bit. Actually i don't like the
warning wh
I'd say silently ignoring it and moving along is fine here.
Only if the var IS_NULL, but this is the case.
So I'm +1.
On 25.10.2005 02:22, Marcus Boerger wrote:
Hello internals,
i would like to change foreach a tiny bit. Actually i don't like the
warning when using foreach with null.
[EMAIL
Marcus Boerger wrote:
i would like to change foreach a tiny bit. Actually i don't like the
warning when using foreach with null.
Marcus, you already know my feelings on this one.
+1
Rob
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub
18 matches
Mail list logo