Page 1 of 1

Extremely stupid question

Posted: Thu Jan 30, 2014 3:21 pm
by lijepdan
Hi guys!

I started learning PHP, and I downloaded php bb3 forum code and I want to figure out how does it work.
I'm sorry for wasting you time but I'm stuck at the very begging of it.
What does this peace of code means

Code: Select all

<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/

/**
* @ignore
*/
Are these comments, why are they starting with /** and not with /*, why so many * symbols (each row has one) and what does this symbol @ mean?
Cheers

Re: Extremely stupid question

Posted: Thu Jan 30, 2014 3:42 pm
by requinix
/* ... */ is a comment, and everything inside of it is ignored. Even if the very first thing is an asterisk. Still just a comment.

/** is the format adopted by phpDocumentor a long time ago and is commonly seen in other languages too. Since the doc format supports various things, like @package and @version, they use a slightly different comment format (but still a valid comment) to distinguish it from regular multi-line comments. The things it supports are mostly just for the sake of generated documentation, like @package to group files together or @version to give a specific version number ($Id$ gets filled in automatically by something else), but others, like @param and @return, are more useful in IDEs that support the syntax (which most do) because they can help you out while writing code.

Your First Set of Documentation