Please enable JavaScript.
Coggle requires JavaScript to display documents.
PSR - Coggle Diagram
PSR
PSR - PHP Standard Recommendations
PSR-0
Autoloading Standard
Vendor\Namespace\ClassName
top level - Vendor Name
many sub-namespace as it wishes
.php file
PSR-1
Basic coding standard
[MUST]
<?php and <?=
UTF-8 w/o BOM
namespace and classes follow PSR - 0
Class name - Sudlly-Caps
Constant
all upper case with underscore separators
method - camelCase
SHOULD
namespace c
PSR-2
Coding Style guide
indent 4 spaces
lines
soft LIMIT - 120 char
Should 80 char or less
one blank line after thenamespace declaration
one blank line after the block of usedeclarations
Opening braces for classes/methods MUST go onthe next line
and closing braces MUST goon the next line after the body.
visibility
MUST be declared on allproperties and methods
abstract and finalMUST be declared before the visibility
static MUST be declared after the visibility
Control structure keywords MUST have onespace after them; method and function callsMUST NOT
PSR-3 Logger Interface
PSR-4 Improved Autoloading