Is debug_backtrace() crippled in PHP 8?

570 Views Asked by At

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.

0

There are 0 best solutions below