Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:208 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48347 invoked from network); 24 Mar 2003 13:07:14 -0000 Received: from unknown (HELO joeysmith.com) (209.197.17.2) by pb1.pair.com with SMTP; 24 Mar 2003 13:07:14 -0000 Received: from joeysmith.com (joey@localhost [127.0.0.1]) by joeysmith.com (8.12.8/8.12.8/Debian-2) with ESMTP id h2OD72it008622 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Mon, 24 Mar 2003 06:07:02 -0700 Received: (from joey@localhost) by joeysmith.com (8.12.8/8.12.8/Debian-2) id h2OD72ZX008620 for internals@lists.php.net; Mon, 24 Mar 2003 06:07:02 -0700 Date: Mon, 24 Mar 2003 06:07:02 -0700 To: internals@lists.php.net Message-ID: <20030324130642.GA5593@joeysmith.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.3i Subject: Make switch/case to type sensitive comparison in PHP 5? From: joey@joeysmith.com (Joey Smith) I was reminded tonight of the following 'feature' of switch: $a = 0; switch($a) { case 'somestring': echo 'Bug?'; break; case 0: echo 'Not a bug'; break; } This will echo 'Bug?' with PHP 4. It seems more logical to have switch comparing with T_IS_IDENTICAL than with T_IS_EQUAL. Is this something that might be changed as we move to PHP 5.0?