Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 773
sv_in Avatar asked Jun 23 '09 12:06

sv_in


People also ask

What does &$ mean in PHP?

passing argument through reference (&$) and by $ is that when you pass argument through reference you work on original variable, means if you change it inside your function it's going to be changed outside of it as well, if you pass argument as a copy, function creates copy instance of this variable, and work on this ...

What is the name of symbol in PHP?

This is called the Object Operator. It is used to access properties and methods inside a class, where you put the -> symbol after.


1 Answers

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

like image 57
RichieHindle Avatar answered Oct 01 '22 18:10

RichieHindle