note 92542 added to function.debug-print-backtrace
| From: | bishop at osu1 dot php dot net | Date: | Tue, 28 Jul 2009 20:20:13 +0000 |
| Subject: | note 92542 added to function.debug-print-backtrace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158844@lists.php.net to get a copy of this message | ||
Another way to manipulate and print a backtrace, without using output buffering:
<?php
// print backtrace, getting rid of repeated absolute path on each file
$e = new Exception();
print_r(str_replace('/path/to/code/', '', $e->getTraceAsString()));
?>
----
Server IP: 64.71.164.2
Probable Submitter: 24.148.150.180
----
Manual Page -- http://www.php.net/manual/en/function.debug-print-backtrace.php
Edit -- https://master.php.net/note/edit/92542
Del: integrated -- https://master.php.net/note/delete/92542/integrated
Del: useless -- https://master.php.net/note/delete/92542/useless
Del: bad code -- https://master.php.net/note/delete/92542/bad+code
Del: spam -- https://master.php.net/note/delete/92542/spam
Del: non-english -- https://master.php.net/note/delete/92542/non-english
Del: in docs -- https://master.php.net/note/delete/92542/in+docs
Del: other reasons-- https://master.php.net/note/delete/92542
Reject -- https://master.php.net/note/reject/92542
Search -- https://master.php.net/manage/user-notes.php