Re: RFC: Server-Side Request and Response Objects (v2)

From: Date: Wed, 12 Feb 2020 22:09:46 +0000
Subject: Re: RFC: Server-Side Request and Response Objects (v2)
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-108523@lists.php.net to get a copy of this message
Hi Albert, > On Feb 11, 2020, at 11:22, Albert Casademont <albertcasademont@gmail.com> wrote: > >> Am 11.02.20 um 13:42 schrieb Albert Casademont: >> >>> This is very interesting, thanks! >>> >>> Would it make sense to also add an INI setting to disable superglobals >>> and response functions? >> >> no because changing basic language behavior that way is not helpful for >> code meant to run everywhere and not stop working just because tomorrow >> someone changed a random ini setting > > That could be said for all INI settings: yes they can break things if you > touch them without knowing what they do. > > I think it might make sense to be able to disable superglobals and response > functions if your codebase is committed to using the new classes, much like > the old "register_globals" did. Why pollute the global namespace if you > don't need them? I share Harald's opinion here. I think a .ini setting to disable superglobals and the response-related functions is out-of-scope for this RFC. -- Paul M. Jones pmjones@pmjones.io http://paul-m-jones.com Modernizing Legacy Applications in PHP https://leanpub.com/mlaphp Solving the N+1 Problem in PHP https://leanpub.com/sn1php

« previous php.internals (#108523) next »