Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89963 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10673 invoked from network); 2 Jan 2016 03:51:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2016 03:51:36 -0000 Authentication-Results: pb1.pair.com header.from=bishop.bettini@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bishop.bettini@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.43 as permitted sender) X-PHP-List-Original-Sender: bishop.bettini@gmail.com X-Host-Fingerprint: 74.125.82.43 mail-wm0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:36790] helo=mail-wm0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/06-06661-74947865 for ; Fri, 01 Jan 2016 22:51:36 -0500 Received: by mail-wm0-f43.google.com with SMTP id l65so114281612wmf.1 for ; Fri, 01 Jan 2016 19:51:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=LK3G7F/gxwBmrkkUNuDx/OHg+wk0azdkm9WyOj7cx0c=; b=VzdUnFU+MpqIXpsQdmaZr5PtFzDOc9GMLqGcOchytUO1dIodSjvkgEk7vpGIp99lpL lFhVlUVvv/QP6T3NWXJwqDUA/7NETBHXgG+nRViuIt19NjELPbR1h8xqydHcQNobsM+1 XtuYT4Ga2r3L1bonCGZPOirciuK9Fw6VbP30nkm1fT23OvfgS7XREKD3gttbr21rCGwn FtLqTIeXS2IWEDNODOc+NYuR7rixer3xXdEY7hxNEz2zNOT9bhUc0Jyu8Kr0CTsp3VMQ hyNqVGcQ5EBFegkeftxb7RrFSdK3HO8tF1hs7x8bkEO7NC62Q/sFlIHInm519nDlKsb/ a6bw== X-Received: by 10.194.209.129 with SMTP id mm1mr44573050wjc.47.1451706693073; Fri, 01 Jan 2016 19:51:33 -0800 (PST) MIME-Version: 1.0 Reply-To: bishop@php.net Sender: bishop.bettini@gmail.com Received: by 10.194.45.230 with HTTP; Fri, 1 Jan 2016 19:51:03 -0800 (PST) In-Reply-To: <568742A6.8070400@gmail.com> References: <568742A6.8070400@gmail.com> Date: Fri, 1 Jan 2016 22:51:03 -0500 X-Google-Sender-Auth: 7bA81zfo74sHCTO27BoQWlMFDgI Message-ID: To: Stanislav Malyshev Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7b3a840ac240ed052851cdfc Subject: Re: [PHP-DEV] [RFC] On-Demand Name Mangling From: bishop@php.net (Bishop Bettini) --047d7b3a840ac240ed052851cdfc Content-Type: text/plain; charset=UTF-8 On Fri, Jan 1, 2016 at 10:23 PM, Stanislav Malyshev wrote: > Hi! > > > Ringing in the new year with a proposal to retool name mangling: > > While the variable name changing probably outlived its usefulness with > the demise of register_globals, changing it would produce serious BC > issues with which we should be very careful. Agreed! > Emitting E_DEPRECATED based > on user data certainly does not sound like a good idea. > Agreed. I updated the RFC to throw a notice only once (per startup) and only if the mangler fires up. This is similar in spirit to the datetime.timezone setting. > I like Nikita's proposal on both counts - making it an config switch (as > much as I hate those) and have extract() flag for this (I would make the > current behavior default to minimize BC disruption). > In my 1.1 update to the RFC, I contend that a config switch will cause problems in some cases. Specifically, the logic goes like this. The config must be PHP_INI_SYSTEM. An engine wide config affects all sites in a shared hosting environment. If one of these sites requires mangling, while another site requires no mangling, we have an operational conflict. The only way to solve that is by giving each site its own engine, which isn't tenable in a shared environment. My RFC update further contends that a userland polyfill solves the BC issue without a config switch. Here's how: The engine is updated to not mangle. The polyfill provides a function that uses extract() to mangle the superglobals. Userland can maintain BC by composing in (or writing their own) polyfill. This approach improves the engine while giving existing sites an escape hatch. > I don't see why it says in the RFC it should be PHP_INI_ALL - I think it > should be PHP_INI_SYSTEM or PHP_INI_PERDIR, as changing it at runtime > won't do anything useful - the values should already be loaded. > That was a typo. Fixed. Thanks! --047d7b3a840ac240ed052851cdfc--