Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19740 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51563 invoked by uid 1010); 26 Oct 2005 19:36:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51548 invoked from network); 26 Oct 2005 19:36:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2005 19:36:52 -0000 X-Host-Fingerprint: 195.197.172.116 gw02.mail.saunalahti.fi Linux 2.4/2.6 Received: from ([195.197.172.116:54689] helo=gw02.mail.saunalahti.fi) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id EB/48-22886-3DADF534 for ; Wed, 26 Oct 2005 15:36:51 -0400 Received: from nest.netphobia.fi (YZDCXXXI.dsl.saunalahti.fi [85.76.35.232]) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 19381D45E6; Wed, 26 Oct 2005 22:36:46 +0300 (EEST) Received: from nest.netphobia.fi (nest.netphobia.fi [127.0.0.1]) by nest.netphobia.fi (8.13.1/8.13.1) with ESMTP id j9QJamVo011966; Wed, 26 Oct 2005 22:36:48 +0300 Received: from localhost (jani@localhost) by nest.netphobia.fi (8.13.1/8.13.1/Submit) with ESMTP id j9QJamgL011963; Wed, 26 Oct 2005 22:36:48 +0300 X-Authentication-Warning: nest.netphobia.fi: jani owned process doing -bs Date: Wed, 26 Oct 2005 22:36:48 +0300 (EEST) Reply-To: Jani Taskinen To: Sebastian cc: internals@lists.php.net In-Reply-To: <4e36d31d0510261018t639c472x9efaaf7af61a9ddb@mail.gmail.com> Message-ID: References: <4e36d31d0510261018t639c472x9efaaf7af61a9ddb@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [PHP-DEV] Re: foreach with null From: sniper@iki.fi (Jani Taskinen) 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'd like to see E_STRICT be used for this if this NULL thing is accepted. Also, I found out recently something that I didn't know about before and which I count as inconsistent: count() returns int(1). It would be nice that count() would also produce an E_STRICT notice when passed something else than object or array. Or rather make every single function and language construct to produce the E_STRICT notice when passed wrong type of variable. --Jani