Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100198 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14201 invoked from network); 13 Aug 2017 14:31:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2017 14:31:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.162 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.162 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.162] ([81.169.146.162:16417] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/4F-34801-2C260995 for ; Sun, 13 Aug 2017 10:31:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1502634687; l=4041; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:References:In-Reply-To: MIME-Version; bh=JXK9o/uuf21sGvhvmocTRgM+IFJmZQxNIXO5fU/XoA4=; b=kev70uE3Ai6x25UJAAFLEBK2RfCVjWfNM1RwpBXU6/hMjaGQW2atUHj88OQ27h2Kbc M+WWmYDA3IIMHYCEsjyrn3YdAVYlYh140yEJywQvhzizLF986CDAZOE8ZDf/W1QikI6Y o15r1u+tYV0udWLQdp7ZBXcDyHeeB0gs6rhrE= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuYROBqD/sok= X-RZG-CLASS-ID: mo00 Received: by mail-yw0-f172.google.com with SMTP id l82so43357839ywc.2 for ; Sun, 13 Aug 2017 07:31:27 -0700 (PDT) X-Gm-Message-State: AHYfb5idOGjAJSCXglY5me5DdgtqC4pFEPwdxzeekhaeSGaU1EJ4sJRt z9pkfDgOzKXCJ7JrbqhLb+mYIXSKLg== X-Received: by 10.129.154.9 with SMTP id r9mr17460325ywg.418.1502634686896; Sun, 13 Aug 2017 07:31:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.176.168 with HTTP; Sun, 13 Aug 2017 07:31:26 -0700 (PDT) In-Reply-To: References: <7e336645-7b47-2772-257a-a51b6849e4b5@gmail.com> Date: Sun, 13 Aug 2017 16:31:26 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Stanislav Malyshev Cc: Rowan Collins , PHP Internals Content-Type: multipart/alternative; boundary="94eb2c0b9150bd63300556a366e0" Subject: Re: [PHP-DEV] Stop Exceptions capturing object references for trace arguments From: me@kelunik.com (Niklas Keller) --94eb2c0b9150bd63300556a366e0 Content-Type: text/plain; charset="UTF-8" 2017-08-12 17:54 GMT+02:00 Stanislav Malyshev : > Hi! > > > My only concern is if anyone is using this data for anything other than > > debugging - e.g. if they were somehow extracting extra context about the > > exception by traversing the backtrace to a particular point and grabbing > > the arguments. That feels like a horrible hack to me, but that doesn't > > mean someone isn't relying on it. > > Sure, that's why I propose to keep the option. If you use the horrible > hack, I think it wouldn't be too much to ask to set an INI variable. > Since it's rather local, it can be INI_ALL so you could do it in the > script even. > > > An interesting side effect of an ini setting, though, is that it could > > in turn be made to raise deprecation warnings at some point, whereas > > just accessing the 'args' element of an array is pretty hard to detect. > > So for instance, we could theoretically have: 7.3, add ini setting > > defaulting to on; 7.4, change default to off and raise deprecation > > notice if it's turned on; 8.0, remove feature, error if ini setting is > > not set to on (ignore if set to off for smoother upgrades). > > Yep, sounds like a plan. Not sure if we need to drop it for 8.0 even, > but we can vote on that. Anybody to make an RFC for this? :) > If it's explicitly needed, someone could still just call `debug_backtrace()` and manually store the args in the exception constructor, no? Would the args still be available in the stringified version? Because they're quite useful for debugging there. Regards, Niklas --94eb2c0b9150bd63300556a366e0--