HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
PHP Error Reference
The debug_backtrace() function generates a PHP backtrace.
This function displays data from the code that led up to the debug_backtrace() function.
Returns an array of associative arrays. The possible returned elements are:
Name | Type | Description |
---|---|---|
function | string | The current function name |
line | integer | The current line number |
file | string | The current file name |
class | string | The current class name |
object | object | The current object |
type | string | The current call type. Possible calls:
|
args | array | If inside a function, it lists the functions arguments. If inside an included file, it lists the included file names |
Parameter | Description |
---|---|
options | Optional. Specifies a bitmask for the following options: DEBUG_BACKTRACE_PROVIDE_OBJECT (Whether or not to populate the "object" index DEBUG_BACKTRACE_IGNORE_ARGS (Whether or not to omit the "args" index, and all the function/method arguments, to save memory) |
limit | Optional. Limits the number of stack frames printed. By default (limit=0) it prints all stack frames |
Return Value: | An array of associative arrays |
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 5.4: The optional parameter limit was added PHP 5.3.6: The parameter provide_object was changed to options and additional option DEBUG_BACKTRACE_IGNORE_ARGS is added PHP 5.2.5: The optional parameter provide_object was added PHP 5.1.1: Added the current object as a possible return element |
PHP Error Reference