Should there be a space between <?php
and namespace
inside a php class file?
I am looking for this information in PSR guidelines. There are indication about a space after. But before?
Should there be a space between <?php
and namespace
inside a php class file?
I am looking for this information in PSR guidelines. There are indication about a space after. But before?
PSR-2 Its purpose is to have a single style guide for PHP code that results in uniformly formatted shared code.
*Files
All PHP files MUST use the Unix LF (linefeed) line ending.
All PHP files MUST end with a single blank line.
The closing ?> tag MUST be omitted from files containing only PHP.
Lines
There MUST NOT be a hard limit on line length.
The soft limit on line length MUST be 120 characters; automated style checkers MUST warn but MUST NOT error at the soft limit.
Lines SHOULD NOT be longer than 80 characters; lines longer than that SHOULD be split into multiple subsequent lines of no more than 80 characters each.
There MUST NOT be trailing whitespace at the end of non-blank lines.
Blank lines MAY be added to improve readability and to indicate related blocks of code.
There MUST NOT be more than one statement per line.
Indenting
Keywords and True/False/Null
NameSpace and Use Declaration