Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The at (@) symbol 2

Status
Not open for further replies.

JBlair

Programmer
May 30, 2003
76
US
I know that this symbol is used to suppress warnings, but I've also seen its used within blocks of comments to denote things such as version, param, copyrights, etc.

My questions are as such... Are these passed to the browser as meta tags or something similar? Is there any use for the variables defined in this way? Can I create my own this way, such as possibly an @author, @dtg, etc?

I've searched google, php.net, and this site and the most information I could find was usually in relation to suppressing errors or PERL and Ruby code.

 
You (and me;) may use all characters in comments: it's not PHP language topic. As usually, @ sign denotes auto doc system keywords (for example, in brillian Doxygen). PHP comment contents never passed to the browser: PHP interpreter ignores comments.
 
the @ sign cannot be used in php variables.
as ArkM says - you can use @ signs as you wish inside comments and there are not interpreted by php
and as you point out, they are used to suppress errors from function calls - thus the reason why you cannot use them in variables.
 
Okay, so the @param, @version, @etc that I'm seeing within comments is possibly for documentation.

Many thanks for the replies.
 
yes. it is for documentation. they are used as tags for phpDocumentor I believe (and perhaps for similar documentor scripts. there is some good information on comment blocks in the pear coding standards manual, I believe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top