Wednesday 3 August 2016

operators - 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?


Answer



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


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...