(PHP 5, PHP 7)
Exception::getTrace — 锟斤拷取锟届常追锟斤拷锟斤拷息
锟斤拷锟斤拷锟届常追锟斤拷锟斤拷息锟斤拷
锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷
锟斤拷锟截帮拷锟斤拷锟届常追锟斤拷锟斤拷息锟斤拷锟斤拷锟介(array锟斤拷锟斤拷
Example #1 Exception::getTrace()示锟斤拷
<?php
function test() {
throw new Exception;
}
try {
test();
} catch(Exception $e) {
var_dump($e->getTrace());
}
?>
锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�
array(1) { [0]=> array(4) { ["file"]=> string(22) "/home/bjori/tmp/ex.php" ["line"]=> int(7) ["function"]=> string(4) "test" ["args"]=> array(0) { } } }