PHP debug_print_backtrace() function
Example
ຂຽນຄຳການກັບ PHP:
<?php function a($txt) { b("ກລັນ"); } function b($txt) { c("ລິວແລນ"); } function c($txt) { debug_print_backtrace(); } a("Peter"); ?>
The output of the above code is similar to this:
#0 c(Cleveland) called at [C:\webfolder\test.php:6] #1 b(Glenn) called at [C:\webfolder\test.php:3] #2 a(Peter) called at [C:\webfolder\test.php:11]
Definition and Usage
debug_print_backtrace() function prints PHP backtrace (backtrace).
debug_print_backtrace() prints a PHP backtrace. It prints function calls, included/required files, and eval() code.
Syntax
debug_print_backtrace(options,limit);
Parameter | Description |
---|---|
options |
Optional. Defines the bitmask for the following parameters:
|
limit | Optional. Used to limit the number of stack frames returned. The default is (limit=0), returning all stack frames. |
Technical Details
Return Value: | None |
---|---|
PHP Version: | 5.0+ |
PHP Log Update: |
PHP 5.4: ສະເຫຼງຂໍ້ມູນສຳລັບສິ່ງທີ່ຄວນເລືອກ limit. PHP 5.3.6: ສະເຫຼງຂໍ້ມູນສຳລັບສິ່ງທີ່ຄວນເລືອກ options. |