Skip to content

Reference for writing clear PHP code

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.md
Unknown
LICENSE-CC.md
Notifications You must be signed in to change notification settings

dseguy/clearPHP

Repository files navigation

clearPHP

Reference for writing clear PHP code

It is difficult to know when one's code is well written. There are recommendations for writing PHP code in the manual, from CS theories, peers review, and gut feeling. That makes a lot of rules.

The main goal of this document is to collect such rules, so as to have them all easy to read and select them for reviewing one's code. This is a reference document, in which anyone may look for ways to improve their code.

Read the clearPHP rules.

So Many Rules

There are obviously a lot of rules. And probably some will be added soon.

  • This is no ultimate coding standard : claiming that any code is 100% compatible with the current reference is futile. No medals are eventually distributed.
  • Don't use them all : it would be difficult to apply them all at the same time in one code. This is because some rules generates too many observations (try to educate quotes), some may be contradictory.
  • It is fine to hate some rules : this is a reference. Its first goal is to collect their rules, their description, their advantages and drawbacks. After this, you'll be able to adopt some of them. This also means that you will dislike some rules : this is OK.

License

Unless stated otherwise, all content is licensed under the Creative Commons Attribution License.

A copy of the license is included in the repository.

Acknowledgements

ClearPHP was originally written by Damien Seguy. The following people have contributed to this project:

About

Reference for writing clear PHP code

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.md
Unknown
LICENSE-CC.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published