PHP coding standards

前端 未结 5 1740
猫巷女王i
猫巷女王i 2020-12-17 20:28

I\'ve been looking for some guidelines on how to layout PHP code. I\'ve found some good references, such as the following:

http://www.dagbladet.no/development/phpcod

5条回答
  •  伪装坚强ぢ
    2020-12-17 20:38

    There's really not a single, common standard for these things. Most languages are more restrictive than PHP in this sense.

    In the later years, a lot of so-called frameworks have emerged, and amongst other things they define a set of rules for everything from naming over where to place files and to which style your code should follow. There are several frameworks around, so you can't really pick one and call it the standard. However, most frameworks have a subset of commonality. For example, most follows some variant of the PEAR Coding Standards.

提交回复
热议问题