Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Листинг 26.12. Вывод сведений об исключении. Файл tostring.php
- <?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}
Advertisement
Add Comment
Please, Sign In to add comment