Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79854 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15048 invoked from network); 21 Dec 2014 23:33:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Dec 2014 23:33:15 -0000 Authentication-Results: pb1.pair.com header.from=davidkmuir@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=davidkmuir@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.43 as permitted sender) X-PHP-List-Original-Sender: davidkmuir@gmail.com X-Host-Fingerprint: 209.85.220.43 mail-pa0-f43.google.com Received: from [209.85.220.43] ([209.85.220.43:59224] helo=mail-pa0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/B4-08160-9B857945 for ; Sun, 21 Dec 2014 18:33:15 -0500 Received: by mail-pa0-f43.google.com with SMTP id kx10so4763746pab.30 for ; Sun, 21 Dec 2014 15:33:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=ymIQjnXg9fR0kDzRjvvPM8L3OlqOa0g6y7EYIVFXowo=; b=NMXCtWmu3z0fgOR5sltU5tYIucbVFCtGLDzK4uWE1tJzT2OQXWGV92+8tt0Pv8YcMP yj3Cz7I6S/Ia0klTD0r6aSnGw0fgtT89DNdfb0PZKmIvtGN/TVlR1JI7HPqcslSHRqWn f+e+znArWxUgOssScSuk/k4ucv4yRmLqM7rMqyYoqepzHUuT2w+6yoR5KZLsWKGou9tw 0rMO59szXXHWw/BWyeJMQ1J2f06ZMlCaw0ulUvfQtsF2AXWLUR8qMCtQV6lS6lKsq1hI wk5bI/B/kegfrAGe5MbB47cUZPntNtz9JEtYA7vMf6J9mOcCZ/7/3H5dSw2wFbTTwMYT e6AA== X-Received: by 10.68.90.165 with SMTP id bx5mr30570395pbb.44.1419204791064; Sun, 21 Dec 2014 15:33:11 -0800 (PST) Received: from [192.168.0.7] (115-64-165-88.static.tpgi.com.au. [115.64.165.88]) by mx.google.com with ESMTPSA id oa8sm15411712pdb.84.2014.12.21.15.33.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Dec 2014 15:33:09 -0800 (PST) References: <000c01d01ca0$7e70c850$7b5258f0$@yahoo.fr> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: Cc: Paul Dragoonis , "nf.laupretre@yahoo.fr" , PHP Internals List X-Mailer: iPhone Mail (11D257) Date: Mon, 22 Dec 2014 10:33:03 +1100 To: Kevin Israel Subject: Re: [PHP-DEV] Proposal for PHP 7 : case-sensitive symbols From: davidkmuir@gmail.com (David Muir) > On 21 Dec 2014, at 10:32 am, Kevin Israel wrote: >=20 >> On 12/20/2014 05:16 PM, Paul Dragoonis wrote: >> It's too big of a BC change firstly. >>=20 >> Secondly it has no language benefit or developer benefit. >=20 > Are you sure? Autoloading schemes such as PSR-4 derive pathnames from > class names without converting them to lowercase. If case mismatches go > undetected and unreported, a project might work on a developer's Windows > desktop (case-insensitive) yet not when uploaded to a Linux web server > (case-sensitive). Or when an object instantiation or a static method > call using the correct case is removed from the code, a later call using > the incorrect case might break. >=20 > Backward compatibility is perhaps a good reason to not make this change. > However, I would like to see at least an option to report case > mismatches in class names as E_STRICT errors and possibly a way to > disable that for specific files or classes when necessary. >=20 >> On 20 Dec 2014 22:01, "F & N Laupretre" wrote: >=20 >>> I would like to propose that namespaces, functions, and classes become >>> case-sensitive (constants are already case-sensitive). Actually, I never= >>> understood why they are case-insensitive. Even if the performance gain i= s >>> negligible, I think it could be the right time to question this. >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 +1 on E_STRICT warning for case mismatch on class names. Also +1 on eventual= case sensitivity for userland class names. Not convinced the rest is worth i= t. The insensitivity makes code brittle. Sometimes the same code will run fine,= and other times it breaks depending on what lines triggered the auto loader= . If you instantiate a Foo instance first, then instantiate a new foo, the c= ode runs fine, but if you try to instantiate a new foo first, we get a fatal= error. Cheers, David=