what is the meaning of /** in php example
/**
* Method to display a view.
*
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController This object to support chaining.
* @since 1.5
*/
i cant seem to search about it? what is the keyword to use for me to be able to search on it? does it go into the code or just a comment?
This is called DocBlock style commenting. In general, code should be commented prolifically. It not only helps describe the flow and intent of the code for less experienced programmers, but can prove invaluable when returning to your own code months down the line. This is not a required format for comments, but it is recommended.
DocBlock style comments preceding class and method declarations so they can be picked up by IDEs:
/**
* Super Class *
* @package Package Name
* @subpackage Subpackage
* @category Category
* @author Author Name
* @link http://example.com
*/
class Super_class {
Source:Click!
In IDEs like netbeans,this commenting style is detected and the * pointers are automatically generated (like in listing pointers). All you have to do is open /**
and press Enter!
/*
starts a comment. Anything else after that, until the first */
is part of the comment, so the second *
in /**
is nothing special - just part of the comment. Some in-line documentation/code annotation systems may find it significant, but to PHP it means absolutely nothing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With