Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71615 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27642 invoked from network); 26 Jan 2014 23:36:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2014 23:36:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.113 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.113 smtp113.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.113] ([67.192.241.113:60247] helo=smtp113.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/1A-12631-CEB95E25 for ; Sun, 26 Jan 2014 18:36:13 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp21.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id A265B240319; Sun, 26 Jan 2014 18:36:09 -0500 (EST) X-Virus-Scanned: OK Received: by smtp21.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 4289924030A; Sun, 26 Jan 2014 18:36:09 -0500 (EST) Message-ID: <52E59BE8.7070202@sugarcrm.com> Date: Sun, 26 Jan 2014 15:36:08 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Chris Wright , Andrea Faulds CC: PHP internals References: <52E55D0F.3030308@ajf.me> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP and case-sensitivity inconsistency in PHP 6 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > So essentially, I would like to see case sensitivity at call time > (called name must match declaration), but case insensitivity at > declaration time (when checking whether a symbol has already been > declared): What would function_exists('Foo') return when foo() is defined? If false, then this code: if (!function_exists('Foo')) { function Foo() { ... } } would not work. If true, then this code: if(function_exists('Foo')) { Foo(); } would not work. Both are working fine now and there's no real reason why shouldn't they keep working. Additionally, making the engine case-sensitive would simplify some areas of function/class handling. But making it inconsistently partially case-sensitive would instead complicate it, as we now would have to make additional checks against original name before calling. My opinion is if we go case-sensitive, it must be full case sensitivity, no exceptions. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227