Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79856 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19855 invoked from network); 22 Dec 2014 00:51:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2014 00:51:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.177 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.212.177 mail-wi0-f177.google.com Received: from [209.85.212.177] ([209.85.212.177:60320] helo=mail-wi0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/85-08160-9FA67945 for ; Sun, 21 Dec 2014 19:51:07 -0500 Received: by mail-wi0-f177.google.com with SMTP id l15so6561140wiw.4 for ; Sun, 21 Dec 2014 16:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=tXS1wr2HNlIg22dXlzOGET53FvRNeCOmyWz8w0IHYb0=; b=WlWnonPVQZ+S5YmWyy7rahHuKlv1re53/WGa8H7LbJcZ8AaSdUU4ncncWks2/K4V9G SYxBeUICv9b1XSupMcYGdiTEjdF2ud3ekcFpaWBZ3nfvYjYYObNBnlnQ/DYSgMszZinI gvYGYaCCADiPNJihYG0y7t7b6etCeVBfX0nZt4LGUFOeDQsfnH3NhCBv1QBRRvSg6L3R UhQ1mIWCWxex/xnGMzS4XB5MBDvEYqvJO5K4OqHK99ahmKC+EQWTOFet3SwKZdq5Yptk IDOiJzvqLlgTTnMyK4nmzuffJm2jLl9TuRKs0F//UoKS1PKUYVrgDJICKYLXcnIZrcU6 jILA== X-Received: by 10.180.74.108 with SMTP id s12mr26910393wiv.28.1419209461534; Sun, 21 Dec 2014 16:51:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.222.99 with HTTP; Sun, 21 Dec 2014 16:50:41 -0800 (PST) In-Reply-To: <43C635B0-65E4-48DE-B8FA-05AAB26138E3@ajf.me> References: <000c01d01ca0$7e70c850$7b5258f0$@yahoo.fr> <43C635B0-65E4-48DE-B8FA-05AAB26138E3@ajf.me> Date: Mon, 22 Dec 2014 01:50:41 +0100 Message-ID: To: Andrea Faulds Cc: David Muir , Kevin Israel , Paul Dragoonis , "nf.laupretre@yahoo.fr" , PHP Internals List Content-Type: multipart/alternative; boundary=f46d043c81e6d11af5050ac373fb Subject: Re: [PHP-DEV] Proposal for PHP 7 : case-sensitive symbols From: ocramius@gmail.com (Marco Pivetta) --f46d043c81e6d11af5050ac373fb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 22 December 2014 at 01:43, Andrea Faulds wrote: > Hey, > > > On 21 Dec 2014, at 23:33, David Muir wrote: > > > > The insensitivity makes code brittle. Sometimes the same code will run > fine, and other times it breaks depending on what lines triggered the aut= o > loader. If you instantiate a Foo instance first, then instantiate a new > foo, the code runs fine, but if you try to instantiate a new foo first, w= e > get a fatal error. > > I=E2=80=99d say that=E2=80=99s not the fault of insensitivity, but the fa= ult of > poorly-written autoloaders. I'd like to know if there's an autoloader that handles case sensitivity without O(2^n) stat calls worst-case scenario (N being namespace/class name parts chars). A stricts standards warning in case of type sensitivity issues after a class with the same was already loaded would make a lot of sense: class Foo {} $foo =3D new Foo; $bar =3D ($foo instanceof foo); // stricts standards Same goes for type-hints in methods, as those may break reflection (which triggers autoloading). Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --f46d043c81e6d11af5050ac373fb--