View Thread : PHP: Why use a @ before a function ?


alexrubin
I was trying to make a script that will add a watermark on images, and i stumbled upon a script that checks if the image exists or not and the used it like this:
$image = @imagecreatefromjpeg("bla.jpg");
if (!$image)....

i wanted to know why do they put the @ before the function :confused:

my_cool_name
that @ means that if that function (imagecreate...) gives and error, don't output it.