note 53426 added to function.set-error-handler
| From: | frank at ethisoft dot nl | Date: | Wed, 01 Jun 2005 10:11:17 +0000 |
| Subject: | note 53426 added to function.set-error-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89731@lists.php.net to get a copy of this message | ||
Perhaps it is worth mentioning that in
PHP5
both set_error_handler & set_exception_handler can be called with an array containing 2
arguments:
1) var ==> object
2) string ==> name of handler function in object
EXAMPLE:
<?php
set_error_handler (array($object, 'handler_function'));
set_exception_handler (array($object, 'handler_function'));
?>
Both can point to the same object and handler_function so that both error and exception handling,
which are very much alike usually, can be done by only 1 dedicated class.
----
Manual Page -- http://www.php.net/manual/en/function.set-error-handler.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53426
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53426&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53426&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53426&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53426&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53426&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53426&report=yes
Search -- http://master.php.net/manage/user-notes.php