note 85042 added to language.operators.errorcontrol
| From: | taras dot dot dot di at gmail dot com | Date: | Tue, 12 Aug 2008 15:29:03 +0000 |
| Subject: | note 85042 added to language.operators.errorcontrol | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-143400@lists.php.net to get a copy of this message | ||
I was confused as to what the @ symbol actually does, and after a few experiments have concluded the
following:
* the error handler that is set gets called regardless of what level the error reporting is set on,
or whether the statement is preceeded with @
* it is up to the error handler to impart some meaning on the different error levels. You could make
your custom error handler echo all errors, even if error reporting is set to NONE.
* so what does the @ operator do? It temporarily sets the error reporting level to 0 for that line.
If that line triggers an error, the error handler will still be called, but it will be called with
an error level of 0
Hope this helps someone
----
Server IP: 87.124.64.96
Probable Submitter: 85.158.139.99
----
Manual Page -- http://www.php.net/manual/en/language.operators.errorcontrol.php
Edit -- https://master.php.net/note/edit/85042
Del: integrated -- https://master.php.net/note/delete/85042/integrated
Del: useless -- https://master.php.net/note/delete/85042/useless
Del: bad code -- https://master.php.net/note/delete/85042/bad+code
Del: spam -- https://master.php.net/note/delete/85042/spam
Del: non-english -- https://master.php.net/note/delete/85042/non-english
Del: in docs -- https://master.php.net/note/delete/85042/in+docs
Del: other reasons-- https://master.php.net/note/delete/85042
Reject -- https://master.php.net/note/reject/85042
Search -- https://master.php.net/manage/user-notes.php