Skip to content
Advertisement

What is the use of the @ symbol in PHP?

I have seen uses of @ in front of certain functions, like the following:

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

What is the use of this symbol?

Advertisement

Answer

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

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement