For a developer, the document is always one of the biggest headaches. Furthermore, you may take two very different attitudes towards Documents: when you use others' code libraries, what you want most is their technical documents, especially when the time is very tight and you have to read the raw code. When writing your own program
For a developer, the document is always one of the biggest headaches. In addition, you may take two very different attitudes towards the document:
When you use someone else's code library, what you most want is its technical documentation, especially when the time is tight, and you have to read the raw code.
When writing your own program, what you don't want to do most is to write a special technical document for it. you will excuse yourself for various reasons: my code is clear enough, so I don't have to re-compile the document for it anymore ......
To alleviate this conflict, many tools can help you to automatically generate corresponding api documents by extracting corresponding comments from the source code. Javadoc in java and pod2man in perl. In contrast, php seems to lack corresponding tools in the past. However, with the continuous improvement of phpdoc, this situation has greatly improved.
In the first pear encoding rule, annotations in the pear program should be converted by phpdoc. It can be seen that phpdoc does not play a small role in pear. Today, we will discuss in detail phpdoc, an excellent pear program.
PHPDoc is an excellent module under PEAR. it aims to implement functions similar to javadoc and quickly generate API documents with mutual reference and indexing functions for your code. If you have used documents generated by javadoc (such as jdk documents), you will be very clear that if you have not used them, the following is a phpdoc to generate its own document page:
As you can see from the figure, the documents generated by phpdoc are similar to those generated by JAVADOC. it has multiple indexing methods:
Packageindex: index by module
Classtree: this is based on the inheritance relationship of your php class. you can generate a tree index.
Modulegroups: this is divided by module
Elementlist: this is the alphabetic index of all your elements (class, method, process/function, variable)