Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96304 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10001 invoked from network); 10 Oct 2016 15:26:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2016 15:26:00 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Received: from [82.113.146.227] ([82.113.146.227:40214] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/B4-52150-503BBF75 for ; Mon, 10 Oct 2016 11:25:57 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 2C94510D580; Mon, 10 Oct 2016 16:25:54 +0100 (BST) Date: Mon, 10 Oct 2016 16:25:53 +0100 (BST) X-X-Sender: derick@whisky.home.derickrethans.nl To: Xinchen Hui cc: Anatol Belski , Davey Shafik , Nikita Popov , PHP Developers Mailing List In-Reply-To: Message-ID: References: <010701d2218e$b2e12d60$18a38820$@belski.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] Regression between RC1 and RC2? From: derick@php.net (Derick Rethans) 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. cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php twitter: @derickr and @xdebug