Re: a basic question

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

 



* babu <garavindbabu@xxxxxxxxxxx>:
> i am asking a basic question which i could not understand.
> What is the important of "@" symbol in php.
> i mean i have seen some people using @ symbol befor functions etc.
> can some one send me a link to documents.
> for example.
> @(  ($conn or ($conn = ocilogon($account, $passwd, $db)))
>             and ($stmt = ociparse($conn, $sqlstmt))

Just FYI: this question would ahve been better asked on the php-general
list, as it is not specific to databases. However, judging by your
example, you've probably seen it primarily in relation to database
function calls.

The @ operator is used to suppress errors. Many PHP functions will
generate notices or warnings in addition to returning false, and these
errors, if they're being displayed, could mess with headers and/or
program output.

Typically, it's better to try and handle the error, or to determine in
development how to ensure it doesn't occur. However, if the error isn't
critical, and your script can continue to function even if it occurs,
suppressing the error often is a viable option.

-- 
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux