(No version information available, might only be in Git)
Error::getTrace — Zwraca ślad stosu
Zwraca ślad stosu.
Ta funkcja nie posiada parametrów.
Zwraca ślad stosu jako tablicę.
Przykład #1 Przykład użycia Error::getTrace()
<?php
function test() {
throw new Error;
}
try {
test();
} catch(Error $e) {
var_dump($e->getTrace());
}
?>
Powyższy przykład wyświetli coś podobnego do:
array(1) { [0]=> array(4) { ["file"]=> string(22) "/home/bjori/tmp/ex.php" ["line"]=> int(7) ["function"]=> string(4) "test" ["args"]=> array(0) { } } }