View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002080 | Xdebug | Stacktraces | public | 2022-03-28 04:40 | 2022-08-10 01:27 |
Reporter | AndreKR | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Product Version | 3.0.4 | ||||
Summary | 0002080: function_exists true despite xdebug_get_function_stack disabled | ||||
Description | I have existing code like this: if (function_exists('xdebug_get_function_stack')) Since some version of Xdebug this throws a warning: Apparently it isn't fatal, so I don't know what xdebug_get_function_stack() returns in this case (null maybe?) but wouldn't it be better if function_exists('xdebug_get_function_stack') was false if the function is "disabled"? | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.4.20-7.4.29 | ||||
|
It returns an empty array, the same return type as it would use when it can return results.
Yes, that would be better. But I can't do that unless I "hack" PHP's internal function_exists(). This is because functions have to be compiled into PHP (compile time) whereas Xdebug needs to disable these per-process (runtime) due to various variations of the |
|
I just came across this piece of code again. What would be the best way to avoid the warning? Using an Is there a way to check whether the function is enabled before I call it? |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-03-28 04:40 | AndreKR | New Issue | |
2022-03-28 09:03 | derick | Assigned To | => derick |
2022-03-28 09:03 | derick | Status | new => resolved |
2022-03-28 09:03 | derick | Resolution | open => won't fix |
2022-03-28 09:03 | derick | Note Added: 0006257 | |
2022-08-10 01:27 | AndreKR | Note Added: 0006358 |