Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13233 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24826 invoked by uid 1010); 8 Oct 2004 15:27:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 24778 invoked from network); 8 Oct 2004 15:27:25 -0000 Received: from unknown (HELO amber.vis-av.com) (66.92.75.243) by pb1.pair.com with SMTP; 8 Oct 2004 15:27:25 -0000 Received: (qmail 7996 invoked from network); 8 Oct 2004 15:21:55 -0000 Received: from unknown (HELO random.?none?) (192.168.1.9) by amber.internal with SMTP; 8 Oct 2004 15:21:55 -0000 Received: (nullmailer pid 9756 invoked by uid 0); Fri, 08 Oct 2004 15:21:55 -0000 To: "Frank M\. Kromann" Cc: Andi Gutmans , References: <10972478702680000@9866357972520000.9866341568840000> Reply-To: Derrell.Lipman@UnwiredUniverse.com Date: Fri, 08 Oct 2004 11:21:55 -0400 In-Reply-To: <10972478702680000@9866357972520000.9866341568840000> (Frank M. Kromann's message of "Fri, 08 Oct 2004 08:04:30 -0700") Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Common Lisp, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [PHP-DEV] switch() and default: From: Derrell.Lipman@UnwiredUniverse.com "Frank M. Kromann" writes: > It might be documented but it has not always been working like this. I > have some code that I have not touched for over 2 years, and It has workd > with both PHP4 and PHP5 versions (even PHP5-1-0-dev from Aug 19 2004 > 17:03:39 ). After upgrading to PHP5 CVS-HEAD it stopped working. I haven't updated to HEAD in the past few weeks so I haven't seen the problem, but I too have a number of cases where the default condition is the first in the list. It's been working fine. Although I can reorganize the switch to put the default at the end, that makes the code less readable since the numeric ordering of the cases is then out of order. I'd certainly prefer the C-like BC be retained, allowing default: to be wherever is appropriate in the code. Derrell