Forum Moderators: coopster

Message Too Old, No Replies

difference between function foo() and function @foo()

         

bluemagix

6:12 am on Sep 30, 2008 (gmt 0)

10+ Year Member



any body tell me the diffrance between
function foo() and function @foo()

Anyango

7:21 am on Sep 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Normally if function named foo generates any errors, and you called it like foo(), they will be sent to your website along with your other ehco statements, (ofcourse if error reporting is enabled).

But if you call the function as @foo() then errors generated by the function foo won't be sent to the output.

So simply using a @ sign before a function call will not output errors related to that function

Reference: [php.net...]

[edited by: Anyango at 7:22 am (utc) on Sep. 30, 2008]

dreamcatcher

10:05 am on Sep 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



@ is PHP`s error control operator. More info here:
[us.php.net...]

dc