Contents
What PSR-2?
PSR-2 Coding Style Guide PSR is a standard established by PHP-FIG(PHP Framework Interop Group). PHP has various frameworks and libraries such as Zend Framework and Symfony, but all have slightly different coding standards.
What is PSR coding standard?
The PHP Standard Recommendation (PSR) is a PHP specification published by the PHP Framework Interop Group. It comprises what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared PHP code.
What should you use for indenting according to the PSR2 coding style guide?
Code MUST use 4 spaces for indenting, not tabs. There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less.
What PSR-0?
with PSR-0 it means it will look for Acme\Foo\Bar in src/Acme/Foo/Bar.php. while in PSR-4 it will look for Acme\Foo\Bar in src/Bar. php(where Bar class is) .
What PSR-1?
PSR-1 mainly focuses on the basic coding standard for PHP whereas PSR-2 is more like an expanded version of PSR-1. PSR-1 lists a set of simple rules for naming conventions and PSR-2 provides a more comprehensive coding style guide.
Why should you follow PSR standard?
The PHP Standard Recommendation (PSR) is a PHP specification published by the PHP Framework Interoperability Group (PHP-FIG). It serves the standardization of programming concepts in PHP. The aim is to enable interoperability of components. The PHP-FIG is formed by several PHP frameworks founders.
What is PSR in human body?
Percutaneous stereotactic radiofrequency rhizotomy (PSR) is a minimally invasive procedure performed to relieve pain caused by trigeminal neuralgia, glossopharyngeal neuralgia, and cluster headache. PSR uses a heating current to destroy some of the nerve fibers carrying pain signals to the brain.