title: Suppress error with @ operator in PHP
body: <p>In your opinion, is it ever valid to use the @ operator to suppress an error/warning in PHP whereas you may be handling the error?</p>
  
  <p>If so, in what circumstances would you use this?</p>
  
  <p>Code examples are welcome.</p>
  
  <p>Edit: Note to repliers. I'm not looking to turn error reporting off, but, for example, common practice is to use</p>
  
  <pre><code>@fopen($file);
  </code></pre>
  
  <p>and then check afterwards... but you can get rid of the @ by doing</p>
  
  <pre><code>if (file_exists($file))
  {
      fopen($file);
  }
  else
  {
      die('File not found');
  }
  </code></pre>
  
  <p>or similar. </p>
  
  <p>I guess the question is - is there anywhere that @ HAS to be used to supress an error, that CANNOT be handled in any other manner?</p>