gettraceasstring
Exception::getTraceAsString
Gets the stack trace as a string
ENTITY
final
public
string
Exception::getTraceAsString
Returns the Exception stack trace as a string.
ENTITY ENTITY
ENTITY
Returns the Exception stack trace as a string.
ENTITY
Exception::getTraceAsString example
<?php
function test() {
throw new Exception;
}
try {
test();
} catch(Exception $e) {
echo $e->getTraceAsString();
}
?>
ENTITY
#0 /home/bjori/tmp/ex.php(7): test()
#1 {main}
ENTITY
Throwable::getTraceAsString
这篇文档对你有帮助吗?
谢谢你的反馈!