Quick PHP symbol question

I’ve seen the @ symbol used in PHP. Usally in front of a function, what excalty does it do…?

It prevents the function from printing out an error message to the screen :slight_smile:

For example, with this script:


 <?php
 mysql_connect("foo", "foo", "foo");
 ?>
 

it would normally print out “Warning: mysql_connect(): Unknown MySQL Server Host ‘foo’ (1) in - on line 2”

However, with the @ in front of mysql_connect, it prints out nothing, because the @ supresses the error message.

ahhh, ok, simple enough, thanks!