thomashw Posted June 11, 2010 Share Posted June 11, 2010 I constantly see @ used infront of functions. What does it do? Quote Link to comment https://forums.phpfreaks.com/topic/204455-what-does-do/ Share on other sites More sharing options...
jcbones Posted June 11, 2010 Share Posted June 11, 2010 Suppresses error notifications. IMO it should be used sparingly, or not at all. The only time I use it is for arrays where the key's are dynamic, and I'm adding them together in a while loop. Other than that, define your variables, and don't divide by 0. Then you won't need them. Quote Link to comment https://forums.phpfreaks.com/topic/204455-what-does-do/#findComment-1070657 Share on other sites More sharing options...
phpchamps Posted June 11, 2010 Share Posted June 11, 2010 it suppresses the error.. PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored. If the track_errors feature is enabled, any error message generated by the expression will be saved in the variable $php_errormsg. This variable will be overwritten on each error, so check early if you want to use it. Quote Link to comment https://forums.phpfreaks.com/topic/204455-what-does-do/#findComment-1070658 Share on other sites More sharing options...
thomashw Posted June 11, 2010 Author Share Posted June 11, 2010 Ahh, thank you. Quote Link to comment https://forums.phpfreaks.com/topic/204455-what-does-do/#findComment-1070659 Share on other sites More sharing options...
phpchamps Posted June 11, 2010 Share Posted June 11, 2010 please mark it as resolved.. so that others dont waste their time.... if u have got ur answer.. Quote Link to comment https://forums.phpfreaks.com/topic/204455-what-does-do/#findComment-1070660 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.