Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71653 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41043 invoked from network); 28 Jan 2014 00:46:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2014 00:46:38 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.53 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-la0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:36912] helo=mail-la0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/26-01140-CEDF6E25 for ; Mon, 27 Jan 2014 19:46:37 -0500 Received: by mail-la0-f53.google.com with SMTP id e16so4983771lan.26 for ; Mon, 27 Jan 2014 16:46:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=io+MiYBgANXQPhaBd/sH5DeloyIyY28sOT2erNKXO54=; b=t4UNrTEQOSSbTObXFW5Ol3H9jWaztm9Fqn4grePSNr0usCyNTfpaZKxJWbhCcFQ1OJ ObHoVeEVQVt+XrE1NEmB6/tcKlw5XzzTQ91uUiIWABA2abOxCJhA316cV9zr5TvZuEJT wFVc9WD/WEs3PmK+vcUWJHxTdJMCB5w9Nlr2F5nxHKZQzi41e9Jk2LR80fmjelGVIe3u juh8uvhP6k6ihZ3vMBXaxsgcSd+2t4/HflUAVzgW1r9gpNEHpHhkfuTl8bJaBVG/UZ39 XH76E5dNrYWQ3Ve1/ocgA4QvAOYyeIt3qbjrh/5MSQqcRH7qmBZ3S6iO45VCaahBp1kL NWMw== X-Received: by 10.112.242.134 with SMTP id wq6mr5688859lbc.24.1390869993211; Mon, 27 Jan 2014 16:46:33 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.132.134 with HTTP; Mon, 27 Jan 2014 16:45:53 -0800 (PST) In-Reply-To: <52E59BE8.7070202@sugarcrm.com> References: <52E55D0F.3030308@ajf.me> <52E59BE8.7070202@sugarcrm.com> Date: Tue, 28 Jan 2014 09:45:53 +0900 X-Google-Sender-Auth: TLQfvccj7Fhd5Dh7BaZOJfD6oV4 Message-ID: To: Stas Malyshev Cc: Chris Wright , Andrea Faulds , PHP internals Content-Type: multipart/alternative; boundary=001a113495b2dfcb1204f0fd2701 Subject: Re: [PHP-DEV] PHP and case-sensitivity inconsistency in PHP 6 From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113495b2dfcb1204f0fd2701 Content-Type: text/plain; charset=UTF-8 Hi all, On Mon, Jan 27, 2014 at 8:36 AM, Stas Malyshev wrote: > > 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. +1 for full case sensitivity, no exceptions. We may provide compatibility check and conversion scripts using tokenizer module. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113495b2dfcb1204f0fd2701--