PHP Conference Kansai 2025

Voting

: min(nine, eight)?
(Example: nine)

The Note You're Voting On

bishop
15 years ago
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()));
?>

<< Back to user notes page

To Top