At character in front of function name, its purpose?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
patricklcam
Forum Newbie
Posts: 2
Joined: Tue Mar 31, 2009 10:52 am

At character in front of function name, its purpose?

Post 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
patricklcam
Forum Newbie
Posts: 2
Joined: Tue Mar 31, 2009 10:52 am

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

Post 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.
Post Reply