Page 1 of 1

what's the difference between this @function() and function(

Posted: Tue Nov 25, 2014 5:03 pm
by PHPHelpNeeded
Hi,

for instance I keep seeing function calls like this @socket_create(), but I also seen using regular socket_create() without the @ infront of it.

What's the difference, what does the @ do for a function call than without it?

Re: what's the difference between this @function() and funct

Posted: Tue Nov 25, 2014 5:30 pm
by requinix
@, which is a link if that's not obvious, suppresses errors and is sometimes called the "shut-up operator". It is bad and you shouldn't use it ever* because it hides errors and that's a Bad Thing.

* Well, there are a couple - literally, like, a couple - places it's okay to use. But socket_create() is not one of them.