Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38588 invoked by uid 1010); 23 Sep 2003 20:41:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38491 invoked from network); 23 Sep 2003 20:41:40 -0000 Received: from unknown (HELO ammma.de) (213.83.39.131) by pb1.pair.com with SMTP; 23 Sep 2003 20:41:40 -0000 Received: from ammma.net (ammma.net [62.225.101.66]) by ammma.de (8.11.6/8.11.6/AMMMa AG) with ESMTP id h8NKevq08931 for ; Tue, 23 Sep 2003 22:40:57 +0200 Received: from neo.wg.de (jan.ammma.mil [192.168.100.11]) by ammma.net (8.9.3p2/8.9.3/AMMMa AG) with ESMTP id WAA15090 for ; Tue, 23 Sep 2003 22:41:37 +0200 Received: by neo.wg.de (Postfix, from userid 30) id 3FDDF899FD; Tue, 23 Sep 2003 22:41:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by localhost (Horde) with HTTP for ; Tue, 23 Sep 2003 22:41:39 +0200 Message-ID: <1064349699.7zp9rs5gnic@localhost> X-Priority: 3 (Normal) Date: Tue, 23 Sep 2003 22:41:39 +0200 To: internals@lists.php.net References: <1064324106.4qf5jx9xw2yo@217.255.147.155> <20030923154431.28056.qmail@pb1.pair.com> <05a601c381f3$f36e8b50$0702a8c0@TITAN> <200309231345.58072.ilia@prohost.org> In-Reply-To: <200309231345.58072.ilia@prohost.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs X-Virus-Scanned: by AMaViS-perl11-milter (http://amavis.org/) Subject: Re: [PHP-DEV] Re: Fwd: Re: #25494 [Com]: array_merge allowing "false" as argument (silent when non-array is passed) From: jan@horde.org (Jan Schneider) Zitat von Ilia Alshanetsky : > In my opinion the change is fine, given the current state of affairs a > transitional release between 4.3 & 5.0 does not seem likely. Therefor it > would only seem logical to give people a fair warning (E_NOTICE) that the > (wrong) behavior they are relying upon is not going work/last forever. > Otherwise, without a word of warning working code will suddenly become > broken > code once they upgrade. But they would expect their code to (potentially) break if they upgrade to PHP 5.0. And it actually will, despite the efforts to make 5.0 as BC as possible. > Most people have their error reporting set to E_ALL ^ E_NOTICE (do not > display > notices) so it won't affect them anyway. Even then, the behavior itself > implies a failure in some code, since an non-array value is passed to a > function expecting an array. I venture it would help a number of people > find > errors in their code that before were nigh impossible to find and/or > track > down. I generally agree (this is the purpose of E_NOTICE after all), but there is a subtle difference between what has been fixed and what is broken now. Passing NULLs to array_merge didn't lead to the borked arrays that have been "fixed" by this patch. > And yes PHP is typeless, but all of the code using new argument parsing > functions will most definitely reject strings passed to functions > expecting > arrays and vice versa. I see this situations as not being any different. Does this apply to NULL "values" too? Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft