Skip to main content
Image for post: PHP coding standards

PHP coding standards

What about PSR?

PHP is flexible, too much flexible! It hasn't specific variables types. And you have to pay attention about handling a workflow, especially if you are working with sessions, cookies, forms and many other features. A coding standard in PHP is necessary anyway. Here we have specific ways about how to organize your code. Let's start visiting the PHP-fig repository on github

  • PSR-0, Autoloading standard (deprecated)
  • PSR-1, Basic coding standard
  • PSR-2, Coding style guide
  • PSR-3, Logger inerface
  • PSR-4, Improved autoloading

And we have the PEAR coding standard too, very common and still used. Check out the wikipedia page too: a coding standard is necessary to work better with other team members, let the code to be more clean and readable and so on. Happy coding!

Share this post

This website and/or any sub domains use cookies to understand how you to improve your experience.