Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90351 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35135 invoked from network); 8 Jan 2016 14:39:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2016 14:39:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.177 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.160.177 mail-yk0-f177.google.com Received: from [209.85.160.177] ([209.85.160.177:33666] helo=mail-yk0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/6B-55593-F1ACF865 for ; Fri, 08 Jan 2016 09:39:28 -0500 Received: by mail-yk0-f177.google.com with SMTP id k129so341371246yke.0 for ; Fri, 08 Jan 2016 06:39:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+CfdFJDHTEdMVTsrLpUjLQCQTbJV+BNWlpNEAwTc3CQ=; b=iNhIROyKWui9HMFA/hUfZfUCLQ2NW1iJgvG6wRmp0LutHajhF8h2RXb9t7XtAhjtAA FDPwE6tW85+tnyzdp+JUH0gKuCrkFDoC/Xir6ywg6o/wO4vV4JZclmOtqDC48knK/ZCR ZyK19V+U3+2VJj1ublwUZ3OCEMt9QaFCAk1/4PgATLDE5E2/BpNDlCQ+mxzYB4ROwG8d kF1N2yk89s9YoaH3kQtKjCPnbh9yut6o3I5gLx6IemeisCulOKUps16guFOID+oPBN3V YFNHl2crERlZ97hJCG0S86GEFY9GrHfdFFPw+0mGgT59L9ZDJpmD6Tg2jS7EB5ZDtpKc r67A== MIME-Version: 1.0 X-Received: by 10.13.202.194 with SMTP id m185mr91072170ywd.280.1452263965423; Fri, 08 Jan 2016 06:39:25 -0800 (PST) Received: by 10.129.148.70 with HTTP; Fri, 8 Jan 2016 06:39:25 -0800 (PST) In-Reply-To: References: <5687FEC0.8010103@gmail.com> Date: Fri, 8 Jan 2016 15:39:25 +0100 Message-ID: To: Bishop Bettini Cc: Rowan Collins , Stas Malyshev , PHP internals Content-Type: multipart/alternative; boundary=001a11482e78c77fd60528d38d76 Subject: Re: [PHP-DEV] [RFC] On-Demand Name Mangling From: nikita.ppv@gmail.com (Nikita Popov) --001a11482e78c77fd60528d38d76 Content-Type: text/plain; charset=UTF-8 On Mon, Jan 4, 2016 at 5:16 PM, Bishop Bettini wrote: > On Sat, Jan 2, 2016 at 11:45 AM, Rowan Collins > wrote: > >> On 02/01/2016 03:09, Bishop Bettini wrote: >> >>> But, even without a setting, there's an escape hatch: userland can >>> polyfill >>> the mangling behavior using extract. The updated RFC demonstrates an >>> algorithm. >>> >> >> I'm not that comfortable with requiring / encouraging the use of >> extract() - a rather awkward function which clobbers your local variable >> space in unpredictable ways - to write the polyfill. The fact that the >> clobbering is necessary / useful for extract() is wholly unrelated to the >> need for BC in super-global arrays. >> >> It would be more useful to expose a method or regex constant to userland >> so that the mangling can actually be done in place on appropriate arrays: >> > > I've updated the on-demand name mangling RFC > in light of all > feedback so far. The crux being: > > - If an app requires name mangling: > - As of 7.1, the app will get one E_NOTICE per startup warning of > the impending removal of name mangling > - As of 8.0, the app will need to include a polyfill package and > add one line of code to its bootstrap. (Safe to include the polyfill prior > to the release of 8.0.) > - If an app does not need name mangling, there's no effect, no > notices, nothing needed > > Thanks! > I still don't like this part: > As written, one can't: the engine emits the error as soon as it mangles a variable, at most one time per startup. While that's annoying, it's also informative: someone's hitting your application in a way that may not expect. Even if it's only a single deprecation warning instead of multiple, it's still a deprecation warning that I, as the application author, have absolutely no control over. For me, a deprecation warning indicates that there is some code I must change to make that warning *go away*. Sure, it's informative. But it's enough to be informative about this *once*, rather than every time a user makes an odd-ish request. If we don't want to introduce an ini setting (against which there are good reasons, as you have outlined) I'd just mark this as deprecated with a nice red box in the documentation and upgrading guide, and commit to dropping it in 8.0, but not throw actual deprecation notices. Nikita --001a11482e78c77fd60528d38d76--