# PHP編碼規范(中文版)導讀
本文檔是PHP互操作性框架制定小組([PHP-FIG](https://github.com/php-fig/) :PHP Framework Interoperability Group)制定的PHP編碼規范([PSR](https://github.com/php-fig/fig-standards):Proposing a Standards Recommendation)中譯版。
翻譯過程中參照了 [莫希爾(Mosil)手札](https://github.com/mosil/fig-standards) 的繁體中文版,以及 [Corrie Zhao](https://github.com/hfcorriez/fig-standards) 組織翻譯的簡體中文版, 譯文中為了讓語句通順,便于理解,沒有對原文逐字翻譯,個別語句與原文原意可能略有偏差,希望告知指正。
目前官方已制定的規范包括以下六份文件:
- [PSR-0](https://github.com/PizzaLiu/PHP-FIG/blob/master/PSR-0-cn.md) (已棄用)
- [PSR-1](https://github.com/PizzaLiu/PHP-FIG/blob/master/PSR-1-basic-coding-standard-cn.md)
- [PSR-2](https://github.com/PizzaLiu/PHP-FIG/blob/master/PSR-2-coding-style-guide-cn.md)
- [PSR-2補充](https://github.com/PizzaLiu/PHP-FIG/blob/master/PSR-2-coding-style-guide-meta-cn.md)
- [PSR-3](https://github.com/PizzaLiu/PHP-FIG/blob/master/PSR-3-logger-interface-cn.md)
- [PSR-4](https://github.com/PizzaLiu/PHP-FIG/blob/master/PSR-4-autoloader-cn.md)
- 2014/04/25 添加`PSR-2補充`文件以及修改之前版本中的翻譯不當與錯誤。
- 2014/07/31 添加`PSR-4`。
以下是原版的導讀:
# PHP互操作性框架制定小組
組建本小組的目的是,通過在各項目的代表之間討論他們共同的編碼規范,以制定一個協作標準。本規范的主要面向對象是本小組的各個組成成員,當然,同時也歡迎關注本規范的其它PHP社區采用本規范。
## 提交規范建議
可以通過以下方式給本規范提交建議:
- fork [PSR代碼庫](https://github.com/php-fig/fig-standards),創建并檢出一個分支,在 `proposed/` 下添加 規范建議,然后 push 分支到 Github,最后給我們發送一個 pull request;又或者
- 在 Github 下新建一個討論 ticket;又或者
- 在 [郵件列表](http://groups.google.com/group/php-fig/) 中提交建議。
## 成為投票成員
注意,你 **不需要** 成為投票成員才能在 [郵件列表](http://groups.google.com/group/php-fig/) 中發表言論。
想要成為投票成員,你必須發送一封郵件到 [郵件列表](http://groups.google.com/group/php-fig/) 中。
- 郵件主題格式如下: `Membership Request: {你的名字} ({參與的項目名稱})`
- 郵件內容應包括你的名字、你參與的項目名稱、項目的地址以及其它相關信息。
目前的成員會對你的加入請求進行投票。
請不要在一份申請中提交多個加入請求,每份申請只能提交一份請求。
## 目前的成員及其代表項目列表
1. Nate Abele: Lithium
1. Nils Adermann: phpBB
1. Brett Bieber: PEAR, PEAR2
1. Guilherme Blanco: Doctrine, Doctrine2, et al.
1. Jordi Boggiano: Composer, Packagist
1. Pádraic Brady: Zend Framework
1. Karma Dordrak: Zikula
1. Paul Dragoonis: PPI, PPI2
1. William Durand: Propel, Propel 2
1. Don Gilbert: Joomla
1. Cal Evans: the community at large
1. Larry Garfield: Drupal
1. Ivan Habunek: Apache log4php
1. Paul M. Jones: Solar Framework, Aura Project
1. Karsten Dambekalns: TYPO3 Flow, TYPO3 Neos
1. Larry Masters: CakePHP, CakePHP 2
1. John Mertic: SugarCRM
1. Taylor Otwell: Laravel
1. Ryan Parman: Amazon Web Services SDK
1. Evert Pot: SabreDAV
1. Fabien Potencier: Symfony, Symfony2
1. Mike van Riel: phpDocumentor
1. Andre Romcke: eZ Publish
1. Phil Sturgeon: PyroCMS
1. Lukas Smith: Jackalope
1. Kris Wallsmith: Assetic, Buzz
1. David Zülke: Agavi