View Issue Details

IDProjectCategoryView StatusLast Update
0002274XdebugStep Debuggingpublic2024-07-10 16:02
Reportertefxacn Assigned Toderick  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionnot fixable 
Product Version3.3.2 
Summary0002274: xdebug_start_function_monitor doesn't work with "exit"
Description

xdebug_start_function_monitor doesn't track calls to "exit(1)"

Steps To Reproduce
function my_shutdown() {
    xdebug_notify(xdebug_get_monitored_functions());
    xdebug_stop_function_monitor();
}

xdebug_start_function_monitor(['exit']);
register_shutdown_function('my_shutdown');

function bar() {
    echo 'hello';
    exit(1);
}
bar();

It will report an empty array, but I'd expect it to be non-empty since "exit(1)" was called.

TagsNo tags attached.
Operating System
PHP Version8.2.0-8.2.9

Activities

derick

2024-06-17 23:02

administrator   ~0006974

exit isn't a function in PHP, but a language construct.

There are some plans of changing this: https://wiki.php.net/rfc/exit-as-function

derick

2024-07-10 16:02

administrator   ~0006987

This can currently not be fixed, as exit isn't a function in PHP, but a language construct.

When (or rather, if) exit becomes a function as per a suggestion in https://wiki.php.net/rfc/exit-as-function, this will magically start working.

Issue History

Date Modified Username Field Change
2024-06-17 22:44 tefxacn New Issue
2024-06-17 23:02 derick Note Added: 0006974
2024-07-10 16:02 derick Assigned To => derick
2024-07-10 16:02 derick Status new => resolved
2024-07-10 16:02 derick Resolution open => not fixable
2024-07-10 16:02 derick Note Added: 0006987