|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
What's the deal with @?
Probably a stupid question, but i'm fairly new to PHP and I've seen people call (especially mySQL) functions with @ in front of them, although most scripts I've seen don't. Is there anything special about using @ to call functions?
Thanks |
|
#2
|
|||
|
|||
|
Using @ will suppress an error from being output if there is one.
It's used a lot with mysql as you said so a "Could not connect to db XXXX" message is not spit out. |
|
#3
|
|||
|
|||
|
continuing on with that MastaM00 said,
you also can use @ on variables, etc just about everthing in php you can place a @ in front of, except for if, while, for, .... I use them sometimes if im programming, if i know there is a possiblity that something is not going to work, i will place a @ in front of the function. |
|
#4
|
|||
|
|||
|
Continuing on with that
![]() It's also used if you want to create your own customized error messages: @mysql_query($query) or die("Customized Error Message");
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > What's the deal with @? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|