Reputation:

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

I am pretty new to PHP classes and I want to follow the standard pattern?

Upvotes: 5

Views: 137

Answers (3)

Palantir
Palantir

Reputation: 24182

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

Upvotes: 1

Asaph
Asaph

Reputation: 162781

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.

Upvotes: 0

dreadwail
dreadwail

Reputation: 15409

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.

Upvotes: 3

Related Questions