Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:314 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23871 invoked from network); 26 Mar 2003 18:00:47 -0000 Received: from unknown (HELO www.lerdorf.com) (66.93.78.119) by pb1.pair.com with SMTP; 26 Mar 2003 18:00:47 -0000 Received: from DELL.lerdorf.com (12-235-53-226.client.attbi.com [12.235.53.226] (may be forged)) by www.lerdorf.com (8.12.8/8.12.8/Debian-2) with ESMTP id h2QGfqld017361 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 26 Mar 2003 08:41:59 -0800 Date: Wed, 26 Mar 2003 08:41:59 -0800 (Pacific Standard Time) To: "Ford, Mike [LSS]" cc: internals@lists.php.net In-Reply-To: <7E070107F405BA4790C43526CC4985A10132ADCC@lis-exchange3.lmu.ac.uk> Message-ID: References: <7E070107F405BA4790C43526CC4985A10132ADCC@lis-exchange3.lmu.ac.uk> X-X-Sender: rasmus@lerdorf.com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: RE: [PHP-DEV] Make switch/case to type sensitive comparison in PH P 5? From: rasmus@lerdorf.com (Rasmus Lerdorf) > > I'd really not love to see it :) Use an if-else chain of === > > comparisons > > instead if that's what you really need. > > Oh, well, fair enough -- I can live with that, although I think it's a less > elegant way of programming it. Still, nothing ventured nothing gained...! > ;) Mike, changing this would break all sorts of stuff, and I think it would confuse a lot of people. If HTML form variables were somehow typed by the browsers, then it might make sense, but people are going to write code like: switch($input) { case 1: ... case 2: ... case 3: ... } Forcing people to worry about the type on user input goes against the basic nature of PHP. -Rasmus