Last Updated: June 11, 2021
·
506
· utahcon

You have to have standards!

Alright, so we have talked briefly about frameworks, and ORMs, and other cool things that are happening in PHP. Now let's talk about the best thing happening in PHP PSR-0, PSR-1, and to a less extent PSR-2. All found here:

https://github.com/php-fig/fig-standards/tree/master/accepted

PSR-0 is all about namespacing and how it should be done to make your apps integrate into other folks apps seamlessly, every time.

PSR-1 is about coding PHP with standards. Basic standards on how files should be formatted (opened and closed), UTF-8 and BOM, and details on naming of classes, functions, and properties within objects.

PSR-2 is all about coding style, and is less important that PSR-0 and PSR-1 but is still a good read through. If all developers (or even most) adopt it things will be much easier to grok moving project to project.

Standards are a way of life, and the more people that adopt these standards the easier our lives as developers become.