However there is a section of code which I cannot quite figure out:
Code: Select all
if (!($this->_resource = @mysql_connect( $host, $user, $pass ))) {What does the above line do? To clarify, what's the significance of the "->" symbol?
Moderator: General Moderators
Code: Select all
if (!($this->_resource = @mysql_connect( $host, $user, $pass ))) {Code: Select all
if (!($this->_resource = @mysql_connect( $host, $user, $pass ))) {Ok, I'll agree with that. There are cases in which notices are thrown outside of your control that might be better snuffed out as needed. But I would suggest you attempt to not use it as much as possible, instead shooting for correct implementation of code to not throw errors (if it is within your control).Jcart wrote:I wouldn't say don't use it, simply use it sparingly and only when neccesary.Everah wrote:@ is the error suppression operator. Bad all around, don't use it.