Exception::getTrace
Exception::__toString
Exception
PHP Manual

# Exception::getTraceAsString

(PHP 5 >= 5.1.0)

Exception::getTraceAsString — Gets the stack trace as a string

### Descripción

final public string Exception::getTraceAsString ( void )

Returns the Exception stack trace as a string.

### Lista de parámetros

This function has no parameters.

### Valores retornados

Returns the Exception stack trace as a string.

### Ejemplos

Example #1 Exception::getTraceAsString() example

`<?php
function test() {
throw new Exception;
}
try {
test();
} catch(Exception $e) {
echo $e->getTraceAsString();
}
?>`

El resultado del ejemplo seria algo similar a:

    #0 /home/bjori/tmp/ex.php(7): test()
    #1 {main}

Exception::getTrace
Exception::__toString
Exception
PHP Manual