Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:221 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29268 invoked from network); 24 Mar 2003 17:58:33 -0000 Received: from unknown (HELO nils.bezeqint.net) (192.115.106.38) by pb1.pair.com with SMTP; 24 Mar 2003 17:58:33 -0000 Received: from mr3.bezeqint.net (pip-18.bezeqint.net [192.115.106.18]) by nils.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP id 5F4D07B1 for ; Mon, 24 Mar 2003 19:56:50 +0200 (IST) Received: from mail.zend.com (bzq-117-235-230.cust.bezeqint.net [192.117.235.230]) by mr3.bezeqint.net (Mirapoint Messaging Server MOS 3.2.2-GA) with SMTP id ASN09920; Mon, 24 Mar 2003 19:58:26 +0200 (IST) Received: (qmail 8200 invoked from network); 24 Mar 2003 17:58:17 -0000 Received: from localhost (HELO zeev-laptop.zend.com) (127.0.0.1) by localhost with SMTP; 24 Mar 2003 17:58:17 -0000 Reply-To: zeev@zend.com Message-ID: <5.1.0.14.2.20030324095657.0493cd88@localhost> X-Sender: zeev@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 24 Mar 2003 09:57:42 -0800 To: Joey Smith Cc: internals@lists.php.net In-Reply-To: <20030324130642.GA5593@joeysmith.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Make switch/case to type sensitive comparison in PHP 5? From: zeev@zend.com (Zeev Suraski) References: <20030324130642.GA5593@joeysmith.com> It's not a 'feature', it's a feature. It's not likely to change, dynamic type conversion is one of the foundations of PHP. Zeev At 05:07 24/03/2003, 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