Page 1 of 1

At character in front of function name, its purpose?

Posted: Tue Mar 31, 2009 10:58 am
by patricklcam
I have searched but can't find an answer as to what the prefixed '@' does when used in a function call. Pretty hard search term :-)

Code fragment:
$result = @ldap_get_entries( $ds, $r);

Fragment came from this site: http://code.activestate.com/recipes/101525/

Thanks

Pat

Re: At character in front of function name, its purpose?

Posted: Tue Mar 31, 2009 11:26 am
by patricklcam
Replying to my own query, the @ is an Error Control Operator.

From: http://php.net/operators.errorcontrol

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.