RE: [PHP-DEV] Deprecation of the Error Control Operator (@ symbol)
| From: | Zeev Suraski | Date: | Tue, 05 Jan 2016 11:57:42 +0000 |
| Subject: | RE: [PHP-DEV] Deprecation of the Error Control Operator (@ symbol) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-90086@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Derick Rethans [mailto:derick@php.net]
> Sent: Tuesday, January 05, 2016 12:57 PM
> To: Michael Heap
> Cc: Sara Golemon; Junade Ali; PHP internals
> Subject: Re: [PHP-DEV] Deprecation of the Error Control Operator (@
> symbol)
>
> On Tue, 5 Jan 2016, Michael Heap wrote:
>
> >
> > On Tue, Jan 5, 2016 at 5:45 AM, Sara Golemon <pollita@php.net> wrote:
> >
> > > On Thu, Dec 31, 2015 at 6:52 AM, Junade Ali <mjsa@junade.com> wrote:
> > > > I am looking to submit an RFC in order to remove the error
> > > > suppression operator in PHP, namely the @ symbol.
> > > >
> > > Forwarding a suggestion twitter/@Beryllium9:
> > >
> > > How about a global "disable error suppression" setting? That way a
> > > project lead could enforce it for their codebase (and guarantee that
> > > devs "aren't lazy"), but PHP doesn't lose its pragmatism?
>
> > Sounds like the xdebug.scream or the Scream PECL extension (
> > https://pecl.php.net/package/scream) to me.
> >
> > +1 for baking this functionality into core
>
> That's going to mean an INI setting.. that hosters could abuse. Having
an INI
> setting like this as part of core is IMO not a great idea.
I agree. Perhaps through a declare() statement instead? We could easily
make it file-based, so that the declare() statement only affects the local
file, or we could make it global for the entire request.
Zeev