View Full Version : What does the @ mean?
Rubby
10-15-2007, 07:13 PM
I'm sure this has been posted before and I apologize for that, but I cant seem to find the thread.
I just want to know what it means when @ is placed before a variable instead of the standard $?
Fumigator
10-15-2007, 07:23 PM
Here you go:
http://us2.php.net/manual/en/language.operators.errorcontrol.php
marek_mar
10-15-2007, 07:26 PM
It's never placed instead of the $ before a variable, as in PHP all variables start with a $.
@ suppresses errors that an expression can raise.
4 / 0; // Warning: Division by zero in file.php on line 2
@(4/0); // No error shown.
Rubby
10-15-2007, 07:32 PM
Oh, well that makes so much more sense. Thanks guys.
I guess I'm just used to seeing @ used to define associative arrays and it's really early so it didn't even register that it was being placed before function calls.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.