PHP Coding Style Notes
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
View only
 
 
Still loading...
ABCDEFGHIJKLMNOPQRSTUVW
1
nameHordePEARSolar/AuraZendSymfony2PPIeZ PublishCakePHPLithiumDrupalSabreDAVphpBBZikulaChisimbaC4RespectComposerDoctrineNetteFLOW3Propel2Joomla
2
urlhttp://www.horde.org/apps/horde/docs/CODING_STANDARDShttp://pear.php.net/manual/en/standards.phphttp://solarphp.com/manual/appendix-standards.stylehttp://framework.zend.com/manual/en/coding-standard.htmlhttp://symfony.com/doc/2.0/contributing/code/standards.htmlhttp://www.ppi.io/docs/coding-standards.htmlhttps://github.com/ezsystems/ezp-next/wiki/codingstandardshttp://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.htmlhttps://github.com/UnionOfRAD/lithium/wiki/Spec%3A-Codinghttp://drupal.org/coding-standardshttp://code.google.com/p/sabredav/http://area51.phpbb.com/docs/31x/coding-guidelines.htmlhttps://docs.google.com/a/zikula.org/document/edit?authkey=CPCU0Us&hgd=1&id=1fcqb93Sn-hR9c0mkN6m_tyWnmEvoswKBtSc0tKkZmJAhttp://www.chisimba.comn/ahttps://github.com/Respect/project-info/blob/master/coding-standards-sample.phpn/aObject Calisthenics for PHPhttp://doc.nette.org/en/coding-standardhttp://flow3.typo3.orghttps://github.com/propelorm/Propel2/wiki/Coding-Standardshttp://developer.joomla.org/coding-standards.html
3
votingyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesnonono?yesnoyes
4
indent_type44444tab4tabtab24tab444444tabtab4tabs
5
line_length_limit_soft75757575no85120120808080no1008080??12080120no150
6
line_length_limit_hard85858585nononono100?nonono100100?120120nononono
7
class_namesstudlystudlystudlystudlystudlystudlystudlystudlystudlystudlystudlylower_understudlylowerstudlystudlystudlystudly?studlystudlystudly
8
class_brace_linenextnextnextnextnextsamenextsamesamesamesamenextnextnextnextnextnextnextnextsamenextnext
9
constant_namesupperupperupperupperupperupperupperupperupperupperupperupperupperupperupperupperupperupperupperupperupperupper
10
true_false_nulllowerlowerlowerlowerlowerlowerlowerlowerlowerupperlowerlowerlowerupperlowerlowerlowerlowerlowerupperlowerlower
11
method_namescamelcamelcamelcamelcamelcamelcamelcamelcamelcamelcamellower_undercamelcamelcamelcamelcamelcamelcamelcamelcamelcamel
12
method_brace_linenextnextnextnextnextsamenextsamesamesamesamenextnextsamenextnextnextnextnextsamenextnext
13
control_brace_linesamesamesamesamesamesamenextsamesamesamesamenextsamesamenextsamesamesamesamesamesamenext
14
control_space_afteryesyesyesyesyesnoyesyesyesyesnoyesyesyesyesyesyesyesyesyesyesyes
15
always_use_control_bracesyesyesyesyesyesyesnoyesyesyesnoyesyesyesyesnoyesyesyesyesyesyes
16
else_elseif_linesamesamesamesamesamesamenextsamesamenextsamenextsamenextnextsamesamesamesamesamesamenext
17
case_break_indent_from_switch0/10/10/11/21/21/21/21/11/11/21/21/11/21/21/21/21/21/20/11/11/21/2
18
function_space_afternononononononononononononononononononononono
19
closing_php_tag_requirednonononononononoyesnonononoyesnononononoyesnono
20
line_endingsLFLFLFLFLFLFLFLF?LF?LFLFLFLF?LF?LFLFLF
21
static_or_visibility_firststatic?staticeithereithereithervisibilityvisibilityvisibilityeitherstaticeither?visibility??eithereithervisibilityvisibilitystatic?
22
control_space_parensnonononononoyesnonononononoyes?nonononononono
23
blank_line_after_phpnonononoyesnonononoyesyesnonoyes?yesyesnoyesnoyesno
24
class_method_control_bracenext/next/samenext/next/samenext/next/samenext/next/samenext/next/samesame/same/samenext/next/nextsame/same/samesame/same/samesame/same/samesame/same/samenext/next/nextnext/next/samenext/same/samenext/next/nextnext/next/samenext/next/samenext/next/samenext/next/samesame/same/samenext/next/samenext/next/next
25
26
NOTES:
27
class_brace_line"same" if on same line as class declaration; "next" if on next line
28
method_brace_line"same" if on same line as method declaration; "next" if on next line
29
control_brace_line"same" if on same line as control keyword (if, switch, etc); "next" if on next line
30
control_space_after"yes" if control keywords have a space after them; "no" if not
31
else_elseif_line"same" if on the same line as the previous closing brace; "next" if on the next line
32
case_indent_from_switchthe number of times "case" is indented from "switch"
33
break_indent_from_switchthe number of times "break" is indented from "switch"
34
function_space_after"yes" if function names have a space after them; "no" if not
35
?not specified or not discernible
36
line_endingsLF or CRLF
37
static_or_visibility_first"visibility" if "public static", or "static" if "static public"
38
control_space_parens"yes" for "if ( expr )", no for "if (expr)"
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...
 
 
 
Sheet1
Copy of Sheet1