Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:209 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67904 invoked from network); 24 Mar 2003 13:42:50 -0000 Received: from unknown (HELO joeysmith.com) (209.197.17.2) by pb1.pair.com with SMTP; 24 Mar 2003 13:42:50 -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 h2ODgcit009642 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Mon, 24 Mar 2003 06:42:38 -0700 Received: (from joey@localhost) by joeysmith.com (8.12.8/8.12.8/Debian-2) id h2ODgbfW009640 for internals@lists.php.net; Mon, 24 Mar 2003 06:42:37 -0700 Date: Mon, 24 Mar 2003 06:42:37 -0700 To: internals@lists.php.net Message-ID: <20030324134237.GA9631@joeysmith.com> References: <20030324130642.GA5593@joeysmith.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030324130642.GA5593@joeysmith.com> User-Agent: Mutt/1.5.3i Subject: Re: [PHP-DEV] Make switch/case to type sensitive comparison in PHP 5? From: joey@joeysmith.com (Joey Smith) See also bug 21990. http://bugs.php.net/lbugs.php?id=21990 On Mon, Mar 24, 2003 at 06:07:02AM -0700, Joey Smith wrote: > 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? > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php