Re: [RFC] Transform exit() from a language construct into a standard function
| From: | Tim Düsterhus | Date: | Tue, 28 May 2024 19:29:36 +0000 |
| Subject: | Re: [RFC] Transform exit() from a language construct into a standard function | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123452@lists.php.net to get a copy of this message | ||
Hi
On 5/28/24 16:26, Derick Rethans wrote:
I have just checked this for Xdebug, and you're definitely right with that. With the removal of the ZEND_EXIT opcode, it can not now detect a scope/function exit now.Can you clarify why ZEND_EXIT is special for Xdebug when compared to any other function that unconditionally throws or unconditionally calls exit(); by itself, i.e. any other function with a
never return type?
It also breaks my "do tasks on ZEND_EXIT" with the profiler. It is used to always write the closing profiling footer to the files. Without me being able to overload thati opcode, data would not be complete. I even have two bugs (with tests) for this: - https://bugs.xdebug.org/68 - https://bugs.xdebug.org/631Likewise, how is ZEND_EXIT special here? How does it work differently than a script that runs to completion without calling exit(); or a script that fails, e.g. due to an uncaught exception or due to reaching the memory limit? Best regards Tim Düsterhus