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.
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.
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.
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.
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