Re: foreach with null

From: Date: Wed, 26 Oct 2005 21:38:58 +0000
Subject: Re: foreach with null
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-19745@lists.php.net to get a copy of this message
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

« previous php.internals (#19745) next »