What does adding @ before a function do? I've seen this in some scripts
example:
$connect = @mysql_connect('localhost', 'root', 'password');
instead of
$connect = mysql_connect('localhost', 'root', 'password');
What does adding @ before a function do? I've seen this in some scripts
example:
$connect = @mysql_connect('localhost', 'root', 'password');
instead of
$connect = mysql_connect('localhost', 'root', 'password');
It suppresses any errors that might happen inside the function. Documentation here.
All things considered, this is not recommended as it can lead to some sneaky bugs.