+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 internals, > > > > i would like to change foreach a tiny bit. Actually i don't like the > > warning when using foreach with null. > > > > [EMAIL PROTECTED] /usr/src/php-cvs $ php -r '$n=NULL; foreach($n as $v);' > > make: `sapi/cli/php' is up to date. > > > > Warning: Invalid argument supplied for foreach() in Command line code on > > line 1 > > [EMAIL PROTECTED] /usr/src/php-cvs $ php -r 'foreach(NULL as $v);' > > make: `sapi/cli/php' is up to date. > > > > Warning: Invalid argument supplied for foreach() in Command line code on > > line 1 > > > > The way we use NULL in PHP should result in no warning here. The patch for > > this can be found here: > > http://php.net/~helly/php/ext/ze2/ze2-foreach-null-20051025.diff.txt > > It was made with head but applies to 5.1 as well. > > > > Any opinions? > > > -- > Wbr, > Antony Dovgal >
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php