The 'at' sign (@) variable prefix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I learned through osmosis that I could use the '@' sign to prevent an
error with an uncertain variable. For example, if there is no $_GET[]
value in this line,

$query=$_GET["q"];

I will get an error, but if I prefix the value with '@',

$query=@$_GET["q"];

and no value is available, a null string is returned, and no error is
generated.

This is great, but I'd like to see it in writing. I can't find this
feature in the documentation. Can someone steer me to it?
-- 
Dave




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux