@ symbol before any variable

Why do we put @ symbol before any variable?

Questions by tallman010   answers by tallman010

Showing Answers 1 - 24 of 24 Answers

bibhuphp

  • Jul 22nd, 2010
 

@ in PHP one error control operator the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored.means if errors comes and if you are using @varialbe infront of any PHP function it will not show any Error.

kedarPhp

  • Sep 2nd, 2010
 

Actually it is called as the 'supression operator'.
It is specially used to avoid/supress the display of warnings that function can generate.
It increases the execution time.

  Was this answer useful?  Yes

abc

  • Sep 12th, 2011
 

to supress the error

  Was this answer useful?  Yes

sakshi

  • Oct 21st, 2017
 

It suppress the errors or warnings.
eg@file_get_contents(www.abc.com);
if www.abc.com is not accessible it will suppress the errors.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions