Jump to content
Sign in to follow this  
terryds

@var, @param, @return meaning in php comment

Recommended Posts

I often see comments like

/*** The database class to store PDO objects** @var object*/

What does @var mean?

And, i often see @param, @return too... What do they mean?

 

I've ever seen strange comment like this one below. Can you tell me what it mean?

 

/*** $Id$*/
Edited by terryds

Share this post


Link to post
Share on other sites

As far as I know, that's not PHP syntax and, since it's in a comment, it won't do anything at all. I think it's a convention for developers to know what's in the code.

Share this post


Link to post
Share on other sites

it's probably a take on javadoc notation

http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html

http://en.wikipedia.org/wiki/Javadoc

Edited by thescientist
  • Like 1

Share this post


Link to post
Share on other sites

@Ingolme, @thescientistHave you two really not heard of phpDocumentor or are you being sarcastic :lol: ?

Share this post


Link to post
Share on other sites

No, I generally don't work with anything besides bare PHP.

Share this post


Link to post
Share on other sites

i haven't, but assumed it was, as I mentioned, a take on javadocs, which is exactly what phpdocs is.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...