Created
April 19, 2019 19:06
-
-
Save rfulwell/dcc46d4661197b836a9f357874de453d to your computer and use it in GitHub Desktop.
A test file for use in comparing the behavior or `debug_backtrace` with a traditional debugger call stack.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // filename: a.php | |
| // White space above was inserted to make debug_backtrace line numbers completely exclusive of each other. | |
| class a_class | |
| { | |
| static function a_function($str) | |
| { | |
| echo "<pre>"; | |
| echo "#DB:debug_print_backtrace() running in [" . __FILE__ . ":" . __LINE__ . "]\n"; | |
| debug_print_backtrace(); | |
| echo "</pre>"; | |
| echo "<br>"; | |
| echo "</pre>"; | |
| print("<pre>".print_r(debug_backtrace(),true)."</pre>"); | |
| } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment