View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001347 | Xdebug | Documentation | public | 2016-09-10 00:13 | 2016-09-10 08:24 |
Reporter | frickenate | Assigned To | derick | ||
Priority | low | Severity | trivial | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.4.0 | ||||
Summary | 0001347: xdebug_start_trace and xdebug_stop_trace - incorrect documentation | ||||
Description | The couple of locations in the documentation that show the prototypes for xdebug_start_trace() and xdebug_stop_trace() are incorrect. xdebug_start_trace() is shown with a prototype in which the first argument "trace_file" is required, and that its return type is void. However, the first argument is optional and the return type is actually the string filename of the trace file. xdebug_stop_trace() is shown with a prototype in which the return type is void. However, again the return value is actually the string filename of the trace file. This is mildly annoying as IDEs like PhpStorm bundle the definitions based on the published documentation. The IDE highlights trying to use xdebug_start_trace() without passing a filename as the error "Required parameter $tracefile missing". Using the return value of either function gives the error "'void' function 'xdebug(start|stop)_trace' result used". These should be the documented prototypes: string xdebug_start_trace( [string trace_file [, integer options]] ) string xdebug_stop_trace() | ||||
Steps To Reproduce | <?php $file = xdebug_start_trace(); $file = xdebug_stop_trace(); | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Operating System | |||||
PHP Version | 7.0.5-7.0.9 | ||||
|
Fixed with https://github.com/xdebug/xdebug.org/commit/dc7c45531b9e1f206c7d5f9ed6f635878b7bb13e - I don't know where PhpStorm gets this data from though! |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-09-10 00:13 | frickenate | New Issue | |
2016-09-10 00:13 | frickenate | File Added: Screen Shot 2016-09-09 at 8.13.24 PM.png | |
2016-09-10 08:24 | derick | Note Added: 0003704 | |
2016-09-10 08:24 | derick | Status | new => closed |
2016-09-10 08:24 | derick | Assigned To | => derick |
2016-09-10 08:24 | derick | Resolution | open => fixed |