Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96312 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78209 invoked from network); 11 Oct 2016 09:47:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Oct 2016 09:47:04 -0000 Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:49177] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/00-12116-315BCF75 for ; Tue, 11 Oct 2016 05:47:01 -0400 Received: by h1123647.serverkompetenz.net (Postfix, from userid 1006) id A0C9E78444E; Tue, 11 Oct 2016 11:46:56 +0200 (CEST) Received: from w530phpdev (p54A76BE6.dip0.t-ipconnect.de [84.167.107.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1123647.serverkompetenz.net (Postfix) with ESMTPSA id 2070478444E; Tue, 11 Oct 2016 11:46:54 +0200 (CEST) To: "'Derick Rethans'" , "'Xinchen Hui'" Cc: "'Davey Shafik'" , "'Nikita Popov'" , "'PHP Developers Mailing List'" References: <010701d2218e$b2e12d60$18a38820$@belski.net> In-Reply-To: Date: Tue, 11 Oct 2016 11:46:50 +0200 Message-ID: <018101d223a4$662f4bb0$328de310$@belski.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQItOLydTqT+dIGA3YBv5mmFOlapewMWylwtAqhC8kICT73digIfoWNeAnZT5/Cfh68ygA== Content-Language: en-us Subject: RE: [PHP-DEV] Regression between RC1 and RC2? From: anatol.php@belski.net ("Anatol Belski") Hi, > -----Original Message----- > From: Derick Rethans [mailto:derick@php.net] > Sent: Monday, October 10, 2016 5:26 PM > To: Xinchen Hui > Cc: Anatol Belski ; Davey Shafik ; > Nikita Popov ; PHP Developers Mailing List > > Subject: Re: [PHP-DEV] Regression between RC1 and RC2? > > On Sun, 9 Oct 2016, Xinchen Hui wrote: > > > On Sun, Oct 9, 2016 at 2:06 AM, Anatol Belski wrote: > > > > > From: me@daveyshafik.com [mailto:me@daveyshafik.com] On Behalf Of > > > Davey Shafik > > > > > > > > Yes, we should not mask the exception. The behavior in > > > > 7.0/7.1.0RC1 is much better IMO. > > > > > > > > (As seen here: https://3v4l.org/EJpD4#v700) > > > > > > > > On Fri, Oct 7, 2016 at 12:52 PM, Nikita Popov > wrote: > > > > > > > > > On Fri, Oct 7, 2016 at 9:31 PM, Derick Rethans wrote: > > > > > > > > > > > I was looking at Xdebug for PHP 7.1, and I ran into the > > > > > > following inconsistency: > > > > > > > > > > > > https://3v4l.org/tHteN > > > > > > > > > > > > I first thought that Xdebug was messing up, but it seems like > > > > > > it's different behaviour in PHP itself. As I clearly return an > > > > > > array from __debugInfo, I don't think the new result is the > > > > > > correct one. > > > > > > > > > > > > cheers, Derick > > > > > > > > > > > > > > > > This is due to https://github.com/php/php-src/commit/ > > > > > 2d8ab51576695630a7471ff829cc5ea10becdc0f, which landed in > > > > > PHP-7.0 as well. The problem is that __debugInfo currently is > > > > > not able to handle exceptions gracefully. I think we should > > > > > revert this change for now as it hides the fact that the > > > > > underlying cause of the error is an exception. > > > > > > > > As far as I understand the bug #73067, it was about avoiding the > > > fatal error, not about avoiding the exception. Please correct if I'm > > > wrong. But given this, the fatal error still persists while the > > > exception is removed. It looks like it's doing the exact reversed to > > > what one would expect - no fatal error and the exception can be > > > catched. > > > > > > I see that it's not yet released in 7.0, so I would prefer to revert > > > this in the release, at least. Hui, Nikita, do you think it's > > > possible to improve this for 7.0 in a follow up? I would revert in > > > 7.0.12 and there'll be room to fix it in the dev branch till 7.0.13. > > > Otherwise I'd suggest to revert to the previous behavior in 7.0+ and > > > do a fix in an appropriate higher branch. > > > > > The real problem is: > > > > we are expecting __debugInfo always returns array, but it doesn't > > if exception is threw. > > > > so, if we keep the exception, then we need inserts checks for > > exception (no array) after every debugInfo is called, or, make a FATAL > > error like the way I did > > > > however, I think latter is better, but maybe we could improve > > the fatal error message: > > Sorry, but that's making it a user problem, and not a technical problem for us to > solve correctly. I very much expected an Uncaught Exception here. > Ok, for 7.0.12, I've reverted 2d8ab51576695630a7471ff829cc5ea10becdc0f. Thus, there are yet two weeks till 7.0.13RC1 there to improve the patch. Thanks Anatol