Jump to content

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


terryds
 Share

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 comment
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 comment
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 comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...