RE: [PHP] use of @ operator to suppress errors
| From: | Ford, Mike [LSS] | Date: | Mon, 15 Mar 2004 15:00:35 +0000 |
| Subject: | RE: [PHP] use of @ operator to suppress errors | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-180466@lists.php.net to get a copy of this message | ||
On 15 March 2004 12:12, Stuart wrote:
> Ben Joyce wrote:
>
> On the contrary, the @ prefix suppresses all errors for the block of
> code it precedes where a block is a function or variable. Essentially
> it sets error_reporting to 0 while it evaluates that block.
In fact, to be completely accurate, @ is an operator and suppresses error in
the *expression* to which it applies -- this means you can affect what it
applies to by using parentheses.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211