Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69867 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58200 invoked from network); 25 Oct 2013 14:09:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Oct 2013 14:09:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=richard.bradley@softwire.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=Richard.Bradley@softwire.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain softwire.com designates 195.130.217.221 as permitted sender) X-PHP-List-Original-Sender: richard.bradley@softwire.com X-Host-Fingerprint: 195.130.217.221 eu-smtp-delivery-1.mimecast.com Linux 2.6 Received: from [195.130.217.221] ([195.130.217.221:33822] helo=eu-smtp-1.mimecast.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/53-40084-29B7A625 for ; Fri, 25 Oct 2013 10:09:23 -0400 Received: from smtp.softwire.com (31.221.86.188 [31.221.86.188]) (Using TLS) by uk-mta-8.uk.mimecast.lan; Fri, 25 Oct 2013 15:09:19 +0100 Received: from EXCHLONDON2013.zoo.lan (10.210.10.43) by EXCHLONDON2013.zoo.lan (10.210.10.43) with Microsoft SMTP Server (TLS) id 15.0.712.24; Fri, 25 Oct 2013 15:09:17 +0100 Received: from EXCHLONDON2013.zoo.lan ([10.210.10.43]) by EXCHLONDON2013.zoo.lan ([10.210.10.43]) with mapi id 15.00.0712.012; Fri, 25 Oct 2013 15:09:17 +0100 To: Jordi Boggiano CC: Joe Watkins , "internals@lists.php.net" , Larry Garfield Thread-Topic: [PHP-DEV] [RFC] Exceptions in the engine Thread-Index: AQHO0Yr0AGK57fWUkkCpE1NssFQnYZoFc1pA Date: Fri, 25 Oct 2013 14:09:16 +0000 Message-ID: References: <52699FB5.20300@garfieldtech.com> <526A6BCC.3060502@php.net> <7048a577d3c04532b24585f6b043f913@EXCHLONDON2013.zoo.lan> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.210.1.210] x-pp-proceessed: 35fffef3-36af-403a-a9f0-f56bb0ff3857 MIME-Version: 1.0 X-MC-Unique: 1bd802c4-2390-4b8d-b38d-20578056d455-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Subject: RE: [PHP-DEV] [RFC] Exceptions in the engine From: Richard.Bradley@softwire.com (Richard Bradley) > -----Original Message----- > From: Jordi Boggiano [mailto:j.boggiano@seld.be] > Sent: 25 October 2013 15:03 > To: Richard Bradley > Cc: Joe Watkins; internals@lists.php.net; Larry Garfield > Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine > > On Fri, Oct 25, 2013 at 3:55 PM, Richard Bradley wrote: > >> How could anything be reliant on the behaviour of a fatal error in any= meaningful way ?? > >> > >> Cheers > >> Joe > > > > In plenty of ways: for example currently frameworks can "catch" fatal e= rrors using "register_shutdown_function" and display an error page to the e= nd user (say if there is an attempt to call a method on a null object due t= o an unanticipated runtime error). > > > > Current frameworks might be broken if the way fatal errors work is chan= ged. That would be a BC break. > > > > See e.g. > > http://stackoverflow.com/questions/16284235/zend-framework-error-page- > > for-php-fatal-errors/16284260#16284260 > > > > (This is not a vote for or against this proposal; I'm just answering > > the immediate parent here.) > > Wouldn't this sort of use case be covered by the fact that an uncaught ex= ception would still result in a fatal error? The only case it'd "break" is = if you have a try/catch around your entire application, before you had to l= isten to have a shutdown handler but now your catch would catch the fatal e= xceptions before they bring everything down. You might still end up in the register_shutdown_function yes, but the error= code would have changed (from error_get_last()) i.e. people may well be relying on the exact behaviour of fatal errors. It would be great to fix the somewhat messy state of exceptions & errors in= PHP, but we shouldn't pretend that we can do so without BC breaks. Richard Bradley Tel : 020 7485 7500 ext 3230 | Fax : 020 7485 7575 softwire Sunday Times Best Small Companies - UK top 20 three years running Web : www.softwire.com | Addr : 325 Highgate Studios, 53-79 Highgate Road, = London NW5 1TL Softwire Technology Limited. Registered in England no. 3824658. Registered = Office : 13 Station Road, London N3 2SB