PHP commenting standards

后端 未结 3 584
走了就别回头了
走了就别回头了 2021-02-07 19:46

I need to comment massive amounts of information in only a handful of files, and when I look around Google and here at Stack Overflow, I continue to find results matching co

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 20:14

    In general, PHP seems to have a lot of different style guides...

    1. phpDocumentor style
    2. Zend Framework style
    3. Pear style

    But in general, something to remember about commenting is... you probably don't want to comment every line in your code. Instead, try to make your code readable1 (as is.) And comment (mostly,) when you really need someone else to understand what your code is doing.

    1 http://www.codinghorror.com/blog/2008/07/coding-without-comments.html

提交回复
热议问题