Jump to content

@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
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.

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
Link to post
Share on other sites
  • 2 weeks later...

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...
×
×
  • Create New...