0

I've been going through some PHP code for an open source applications and I've been seeing a lot of use of the "@" symbol in front of functions.

For example:

if (!@copy($_FILE['attachment'], $dest)) {
    return $error['failed'];
}

My question is: what is the "@" symbol in front of the copy function for? I know what the exclamation point is used for, but not the 'at' symbol.

It's not just the copy function that I see it in front of, I've seen it used in front of unlink() (displayed: @unlink($file); ) as well.

Google and the php.net docs don't seem to be able to provide a definitive answer. Can anyone here provide some insight or where to look further?

Thanks!

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Hummdis
0

That's it!? That's the elusive answer? :)

Would it be wise to remove the "@" symbol while debugging then or does it not make a difference?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.