1

While preparing to update to PHP 8, once they have released a new version beyond the broken 8.0.0 (I had to downgrade back to 7.4.x because of an IMAP bug which is allegedly patched now), I read this:

debug_backtrace() and Exception::getTrace() will no longer provide references to arguments. It will not be possible to change function arguments through the backtrace.

Source: https://www.php.net/manual/en/migration80.incompatible.php

However, nothing about that is mentioned on: https://www.php.net/debug_backtrace

I rely on debug_backtrace() for my custom error logger function. I made my own error logger because I found the standard one provided by PHP to be completely useless, always leaving me wondering what actually was erroring out, wasting so much of my life just hunting for where the error actually occurred.

My own error logger (among other features) displays all the arguments (or snippets, if they are too long) sent to the functions.

Am I understanding things correctly in that PHP 8 yanks away this ability? If so, what possible reason could there be for removing this critical core feature?

I hope I'm just misreading this.

  • I don't think this should have any impacts on your error logger. This change was made due to a [bug](https://bugs.php.net/bug.php?id=79108). – Rain Dec 09 '20 at 06:59
  • "Reference" here is in the sense of `&`-style references. It is very unlikely that your error handler is using them. – NikiC Dec 09 '20 at 18:01
  • 1
    This question would be much better if you removed the rants about how you don't like what everyone else is doing, and instead showed some example code, and asked if/how the change will affect that code. As other comments pointed out, the most likely answer is "no", but nobody can say for sure without seeing your code. – IMSoP Jan 14 '21 at 12:42

0 Answers0