downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Exception::__clone> <Exception::getTraceAsString
[edit] Last updated: Fri, 18 Sep 2009

view this page in

Exception::__toString

(PHP 5 >= 5.1.0)

Exception::__toStringНизово представяне на изключението

Описание

public string Exception::__toString ( void )

Връща изключението под формата на низ (string).

Параметри

Тази функция няма параметри.

Връщани стойности

Връща низовото представяне на изключението.

Примери

Example #1 Пример за Exception::__toString()

<?php
try {
    throw new 
Exception("Някакво съобщение за грешка");
} catch(
Exception $e) {
    echo 
$e;
}
?>

Примерът по-горе ще изведе нещо подобно на:

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



add a note add a note User Contributed Notes Exception::__toString
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites