PHP Comment format: automatically generated or created by user?

I always saw these header comments in php and often wondered if any software was used to configure them? I think I remember JavaDoc? But I'm not sure if this is generated automatically? Or is it just some kind of documentation standard?

The following is an example of CodeIgniter :

/** * CodeIgniter * * An open source application development framework for PHP 4.3.2 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ 

I would really like to improve my comments, and I feel that this will be a great form for my projects.

+4
source share
4 answers

It is phpDoc , which is used by some reflection frameworks for dynamic understanding and use of classes (by the code itself).

The IDE will also use it for autocompletion, showing function arguments, etc. It's good to know if your IDE supports these features for the Framework you are using, but not the code you are writing.

PHP Reflection API

Zend Framework Extension (including DocBlocks)

CodeIgniter Comment Guide (Using DocBlock '... so you can find them using the IDE)

DocBlock Description at phpdoc.org (associated with the CI Style Guide)

+3
source

Some IDEs can put it automatically, but people often just enter it.

For PHP, this is a PHP Documentor , you can see the quick start guide here .

This scans your source code and generates documentation based on your comments on your files, classes, and functions.

+1
source

These comments are in compliance with the phpdoc standard and can be used to automatically generate documentation for your code. You can see an example of such documentation here .

While some IDEs have support to make them easier to write, the actual content is hand-written by programmers.

+1
source

This is a JavaDoc, and it is probably autogenerated by the IDE.

-1
source

All Articles