@phpprog

Объясните вывод exception 'Exception' with message 'bang-bang #101!'?

Объясните вывод exception 'Exception' with message 'bang-bang #101!' in tostring.php:3
Stack trace:
#0 tostring.php(6): test(101)
#1 tostring.php(7): outer()
#2 {main}


<?php ## Вывод сведений об исключении
function test($n)
{
$e = new Exception("bang-bang #$n!");
echo "<pre>", $e, "</pre>";
}
function outer() { test(101); }
outer();
?>

Выводимый текст будет примерно следующим:
exception 'Exception' with message 'bang-bang #101!' in tostring.php:3
Stack trace:
#0 tostring.php(6): test(101)
#1 tostring.php(7): outer()
#2 {main}
  • Вопрос задан
  • 152 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы