Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19755 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71803 invoked by uid 1010); 27 Oct 2005 07:44:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71782 invoked from network); 27 Oct 2005 07:44:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2005 07:44:44 -0000 X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:57426] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C6/4E-22886-A2F70634 for ; Thu, 27 Oct 2005 03:18:02 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j9R7HwTI002796; Thu, 27 Oct 2005 09:17:58 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j9R7HhY5002781; Thu, 27 Oct 2005 09:17:44 +0200 Date: Thu, 27 Oct 2005 09:17:43 +0200 (CEST) X-X-Sender: derick@localhost To: Ilia Alshanetsky cc: Marcus Boerger , internals@lists.php.net In-Reply-To: <435FF772.70206@prohost.org> Message-ID: References: <425333877.20051025002259@marcus-boerger.de> <435FF772.70206@prohost.org> X-Face: "L'&?Ah3MYF@FB4hU'XhNhLB]222(Lbr2Y@F:GE[OO;"F5p>qtFBl|yVVA&D{A(g3[C}mG:199P+5C'v.M/u@Z\![0b:Mv.[l6[uWl' MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdi-ict.nl Subject: Re: [PHP-DEV] foreach with null From: derick@php.net (Derick Rethans) 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 debug code. > > -1 for removing the warning. Yes, I agree, we should not remove this warning. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org