PHP alias @ function
问题 I'm new to PHP and I'm confused seeing some examples calling a function with a @ prefix like @mysql_ping(). What is it for? Googling / searching is not much of a help since @ gets discarded and 'alias' is not good enough keyword. 回答1: @ suppresses errors, warnings and notices. You can use it for good purpose if you complement it with a custom error handler or with due check of $php_errormsg variable so you can handle errors properly. In my experience, this proper usage is not seen very much