No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher une fonction PHP

Exception::__toString

(PHP 5, PHP 7)

Exception::__toStringString representation of the exception

Description

public Exception::__toString ( void ) : string

Returns the string representation of the exception.

PHP: Exception::__toString - Manual Home of Manuel PHP  Contents Haut

Parameters

This function has no parameters.

PHP: Exception::__toString - Manual Home of Manuel PHP  Contents Haut

Return Values

Returns the string representation of the exception.

PHP: Exception::__toString - Manual Home of Manuel PHP  Contents Haut

Examples

Example #1 Exception::__toString() example

<?php
try {
    throw new 
Exception("Some error message");
} catch(
Exception $e) {
    echo 
$e;
}
?>

The above example will output something similar to:

exception 'Exception' with message 'Some error message' in /home/bjori/tmp/ex.php:3
Stack trace:
#0 {main}

PHP: Exception::__toString - Manual Home of Manuel PHP  Contents Haut

See Also

Find a PHP function
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph