开发者

What are the naming conventions and other standards used while developing a class in php?

开发者 https://www.devze.com 2022-12-31 07:10 出处:网络
I am pretty new to PHP classes and I want to fo开发者_C百科llow the standard pattern?The Zend guidelines are the most popular:

I am pretty new to PHP classes and I want to fo开发者_C百科llow the standard pattern?


The Zend guidelines are the most popular:

Zend Naming Conventions

Though really the best advice on naming conventions in any project is simply to pick one that works best for you and your team, and therefor will follow so long as it's consistent.


Another popular is the one defined here: http://drupal.org/coding-standards


It makes sense to choose a widely used coding convention that is well documented. One such example is the PEAR coding conventions (which include the PEAR naming conventions). That way you're less likely to encounter stylistic differences among yourself and your team members and you don't need to write and maintain the documentation yourself.

0

精彩评论

暂无评论...
验证码 换一张
取 消