Posted by David Gillen on 11/15/06 16:46
An noise sounding like Pedro Graca said:
> sk wrote:
>> what is the @ used for....
>
> It's used to eliminate error messages generated by an expression.
> http://www.php.net/manual/en/language.operators.errorcontrol.php
>
> Example:
>
> <?php
> error_reporting(E_ALL);
> ini_set('display_errors', '1');
>
> unset($bar, $q);
>
> $foo = $bar; // use of uninitialized variable ($bar)
> $bar = @ $q; // error message suppressed
> ?>
>
Exactly what he said. Additionally it would be considered bad practice, and
you are far better handling errors in your script appropriately instead of
hiding them.
D.
--
/(bb|[^b]{2})/
Trees with square roots don't have very natural logs.
What's the difference between ignorance and apathy? Who knows? Who cares?
Navigation:
[Reply to this message]
|