Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:357 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25077 invoked from network); 27 Mar 2003 02:06:02 -0000 Received: from unknown (HELO ohsmtp02.ogw.rr.com) (65.24.7.37) by pb1.pair.com with SMTP; 27 Mar 2003 02:06:02 -0000 Received: from homer (cpe-024-033-008-238.midsouth.rr.com [24.33.8.238]) by ohsmtp02.ogw.rr.com (8.12.5/8.12.2) with SMTP id h2R260gO016122 for ; Wed, 26 Mar 2003 21:06:01 -0500 (EST) To: internals@lists.php.net Date: Wed, 26 Mar 2003 20:17:27 -0600 Message-ID: <6dn48vobci3dkbukeb530dt0mjd7qnu7c1@4ax.com> References: <7E070107F405BA4790C43526CC4985A10132ADCE@lis-exchange3.lmu.ac.uk> In-Reply-To: <7E070107F405BA4790C43526CC4985A10132ADCE@lis-exchange3.lmu.ac.uk> X-Mailer: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Make switch/case to type sensitive comparison in PH P 5? From: mhsims@midsouth.rr.com (Michael Sims) On Wed, 26 Mar 2003 17:08:25 -0000, you wrote: >Choosing between "case 0:" and (say) "case_identical 0:" would only be = the >same as choosing between =3D=3D and =3D=3D=3D in an if statement -- it = would just give >the opportunity to do it using the elegant switch structure instead of = the >clumsy if...elseif...else chain. Why not something like this: $a =3D 0; switch (true) { case ($a =3D=3D=3D 'somestring'): ... break; case ($a =3D=3D=3D 0): ... break; } It's not pretty, but you might like it better than if...elseif...else...