1

In some places for extracting data of a file @$_FILES[] is used. What is the difference between @$_FILES[] and $_FILES[]?

For example,

$pic = @$_FILES['uploadFile'];

and

$pic = $_FILES['uploadFile'];
Trevor Reid
  • 3,310
  • 4
  • 27
  • 46
Nowshin
  • 81
  • 2
  • 10
  • `@` means no error will be reported https://stackoverflow.com/questions/1032161/what-is-the-use-of-the-symbol-in-php – Saad Suri May 25 '19 at 10:44
  • 1
    Possible duplicate of [What is the use of the @ symbol in PHP?](https://stackoverflow.com/questions/1032161/what-is-the-use-of-the-symbol-in-php) – Trevor Reid May 25 '19 at 11:02

1 Answers1

2

In PHP @ is an operator used to ignore error messages.

From PHP.net:

PHP supports 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.

Trevor Reid
  • 3,310
  • 4
  • 27
  • 46