These standards are exactly the same as PHP-FIG PSR standards, with two differencies:
- you MAY use tabs for indenting
- you MAY write PHP constants
TRUE
,FALSE
, andNULL
in upper case
Basically, PGS standards are suitable for all PHP developers who want to be compliant with well-known standards from the PHP-FIG, but also use tabs instead of spaces.
- PSR-0 - Autoloading Standard
- PSR-1 - Basic Coding Standard
- PGS-2 - Coding Style Guide, replaces PSR-2
- PSR-4 - Improved Autoloader
The 30 % of PHP projects use tabs. Once used character for indentation is extremely difficult to change, especially for bigger projects. Therefore standard PGS-2 in comparsion to the PSR-2 allows using tabs for indentation.
Since the PHP documentation writes
constants TRUE
, FALSE
and NULL
in upper case letters, allows PGS-2 in comparsion
to the PSR-2 to write them in upper case too.
Using tabs or capital letters is optional. You must use the same variant in all codes from one Vendor.