Re: [RFC] On-Demand Name Mangling
| From: | Bishop Bettini | Date: | Mon, 04 Jan 2016 16:16:49 +0000 |
| Subject: | Re: [RFC] On-Demand Name Mangling | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89990@lists.php.net to get a copy of this message | ||
On Sat, Jan 2, 2016 at 11:45 AM, Rowan Collins <rowan.collins@gmail.com>
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
<https://wiki.php.net/rfc/on_demand_name_mangling>
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!