views:

544

answers:

3

I have seen using @ in front of certain functions like following:

$fileHandle = @fopen($fileName, $writeAttributes);

What is the use of this symbol?

+7  A: 

It suppresses errors.

http://uk.php.net/manual/en/language.operators.errorcontrol.php

Aiden Bell
+12  A: 

It suppresses error messages - see Error Control Operators in the PHP manual.

RichieHindle
That was a bit of a quick draw!
Aiden Bell
Yeah; down to the second! I had to check answer-id's to see who came in first :)
Jonathan Sampson
@Aiden: Both dead in the dust. 8-)
RichieHindle
I had time to correct my suppress spelling after posting ... and damn you for enhancing with a link at the same time *rages* :P
Aiden Bell
+1  A: 

Also note that despite errors being hidden, any custom error handler (set with set_error_handler) will still be executed!

nickf