Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a standard style for documentation in PHP? [closed]

I'm new to PHP development, and I'm wondering if the community has any guidelines for inline documentation of code using comments. I'd love something like Python's PEP 257, but I'd settle for a format used by a popular document extraction tool, or even the documentation standard of a popular product.

like image 937
jwhitlock Avatar asked Jun 28 '10 20:06

jwhitlock


People also ask

What are the coding standards in PHP?

Overview. Code MUST follow a "coding style guide" PSR [PSR-1]. Code MUST use 4 spaces for indenting, not tabs. There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less.

In which format PHP Documentor can output the documentation?

Capable of producing documentation in Docbook, HTML, PDF, and Windows Compiled HTML Help formats, PHPDocumentor can go a long way towards taking away the hassle of creating and maintaining end user documentation in a variety of formats.


1 Answers

The most widely used form of API documentation for PHP is phpDocumentor a.k.a. phpdoc. Quite a lot of IDEs are also able to extract information to improve auto-completion hints using phpDocumentor style API docs.

like image 85
Daniel Egeberg Avatar answered Sep 22 '22 12:09

Daniel Egeberg