Re: Possibility to include called object in exception backtrace
| From: | Rowan Tommins [IMSoP] | Date: | Mon, 01 Dec 2025 11:44:57 +0000 |
| Subject: | Re: Possibility to include called object in exception backtrace | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129480@lists.php.net to get a copy of this message | ||
On 1 December 2025 10:36:51 GMT, Derick Rethans <derick@php.net> wrote:
>I don't think that adding an INI setting (again) is a good idea. If you
>want to make this configurable, it should be an option on
>Exception::getTrace() — INI settings make applications less portable
>(even though this is a debugging option).
A parameter on the getter would mean every exception has to capture the references just in case
they're used, which would definitely be a bad idea.
If I remember rightly, the existing INI setting for capturing parameters was added precisely so that
users could turn *off* collection in production builds.
The same reasoning applies to other debugging settings, like skipping evaluation of assertions
rather than silently discarding their results.
Regards,
Rowan Tommins
[IMSoP]