![]() |
||||
|
XDEBUG EXTENSION FOR PHP | DOCUMENTATION Xdebug's basic functions include the display of stack traces on error conditions, maximum nesting level protection and time tracking. Related Settingsxdebug.default_enable
Type: boolean, Default value: 1
If this setting is 1, then stacktraces will be shown by default on an
error event. You can disable showing stacktraces from your code with
xdebug_disable(). As this is one of the basic functions of Xdebug, it is
advisable to leave this setting set to 1.
xdebug.max_nesting_level
Type: integer, Default value: 100
Controls the protection mechanism for infinite recursion protection.
The value of this setting is the maximum level of nested functions that are
allowed before the script will be aborted.
xdebug.scream
Type: boolean, Default value: 0, Introduced in Xdebug >= 2.1
If this setting is 1, then Xdebug will disable the @ (shut-up)
operator so that notices, warnings and errors are no longer hidden.
Related Functionsstring xdebug_call_class()
Returns the calling class
This function returns the name of the class from which the current function/method was called from. Example:
<?phpReturns:
Called @ /home/httpd/html/test/xdebug_caller.php:12 from {main}
string xdebug_call_file()
Returns the calling file
This function returns the filename that contains the function/method that called the current function/method. For an example see xdebug_call_class(). string xdebug_call_function()
Returns the calling function/method
This function returns the name of the function/method from which the current function/method was called from. For an example see xdebug_call_class(). int xdebug_call_line()
Returns the calling line
This function returns the line number that contains the function/method that called the current function/method. For an example see xdebug_call_class(). void xdebug_disable()
Disables stack traces
Disable showing stack traces on error conditions. void xdebug_enable()
Enables stack traces
Enable showing stack traces on error conditions. void xdebug_get_collected_errors( [int clean] )
Returns all collected error messages
Introduced in version 2.1
This function returns all errors from the collection buffer that contains all errors that were stored there when error collection was started with xdebug_start_error_collection().
By default this function will not clear the error collection buffer. If you pass
This function returns a string containing all collected errors formatted as an "Xdebug table". array xdebug_get_headers()
Returns all the headers as set by calls to PHP's header() function
Introduced in version 2.1
Returns all the headers that are set with PHP's header() function, or any other header set internally within PHP (such as through setcookie()), as an array. Example:
<?phpReturns:
array(2) {
[0]=>
string(6) "X-Test"
[1]=>
string(33) "Set-Cookie: TestCookie=test-value"
}
bool xdebug_is_enabled()
Returns whether stack traces are enabled
Return whether stack traces would be shown in case of an error or not. int xdebug_memory_usage()
Returns the current memory usage
Returns the current amount of memory the script uses. Before PHP 5.2.1, this only works if PHP is compiled with --enable-memory-limit. From PHP 5.2.1 and later this function is always available. int xdebug_peak_memory_usage()
Returns the peak memory usage
Returns the maximum amount of memory the script used until now. Before PHP 5.2.1, this only works if PHP is compiled with --enable-memory-limit. From PHP 5.2.1 and later this function is always available. void xdebug_start_error_collection()
Starts recording all notices, warnings and errors and prevents their display
Introduced in version 2.1
When this function is executed, Xdebug will cause PHP not to display any notices, warnings or errors. Instead, they are formatted according to Xdebug's normal error formatting rules (ie, the error table with the red exclamation mark) and then stored in a buffer. This will continue until you call xdebug_stop_error_collection(). This buffer's contents can be retrieved by calling xdebug_get_collected_errors() and then subsequently displayed. This is really useful if you want to prevent Xdebug's powerful error reporting features from destroying your layout. void xdebug_stop_error_collection()
Stops recording of all notices, warnings and errors as started by xdebug_start_error_collection()
Introduced in version 2.1
When this function is executed, error collection as started by xdebug_start_error_collection() is aborted. The errors stored in the collection buffer are not deleted and still available to be fetched through xdebug_get_collected_errors(). float xdebug_time_index()
Returns the current time index
Returns the current time index since the starting of the script in seconds. Example:
<?phpReturns:
0.00038003921508789 0.76580691337585 |
||||
|
This site and all of its contents are
Copyright © 2002-2013 by Derick Rethans.
All rights reserved. |
||||