Merge pull request #36 from philsturgeon/gh-pages

Updated information about the FIG/PSR.
This commit is contained in:
Josh Lockhart
2012-07-08 18:23:31 -07:00

View File

@@ -2,15 +2,17 @@
The PHP community is large and diverse, composed of innumerable libraries, frameworks, and components. It is common for PHP developers to choose several of these and combine them into a single project. It is important that PHP code adhere (as close as possible) to a common code style to make it easy for developers to mix and match various libraries for their projects.
The [Framework Interop Group][1] (a.k.a. PHP Standards Group) has proposed and approved a code style standard — [PSR-1][2] and [PSR-2][3]. Don't let the funny names confuse you. These two standards are merely a "shared set of rules and expectations about how to format PHP code." That's all.
The [Framework Interop Group][fig] (formerly known as the 'PHP Standards Group') has proposed and approved a series of style recommandations, known as [PSR-0][psr0], [PSR-1][psr1] and [PSR-2][psr2]. Don't let the funny names confuse you, these recommendations are merely a set of rules that some projects like Drupal, Zend, CakePHP, phpBB, AWS SDK, FuelPHP, Lithium, etc are starting to adopt. You can use them for your own projects, or continue to use your own personal style.
You should write PHP code that adheres to one or both of these standards so that other developers can easily read and work with your code.
Ideally you should write PHP code that adheres to one or more of these standards so that other developers can easily read and work with your code. They all add on to the recommendation before, so using PSR-1 requires PSR-0, but does not require PSR-2.
* [Read about PSR-1][2]
* [Read about PSR-2][3]
* [Read about PSR-0][psr0]
* [Read about PSR-1][psr1]
* [Read about PSR-2][psr2]
[Back to Top](#top){.top}
[1]: https://github.com/php-fig/fig-standards
[2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
[3]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[fig]: http://www.php-fig.org/
[psr0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
[psr1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
[psr2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md