• Home
  • Get Noticed 2017
  • PHP
  • Quick Tips
  • Contact
  • About me

Bartosz Sosna Blog

Bartosz Sosna Blog

PHP BLOG

PHP coding standards – the first steps
Get Noticed 2017, PHP, PhpStorm

PHP coding standards – the first steps

PHP coding standards

When I did write my first code, I did not know anything about PHP coding standards. My code was disgusting and very hard to read and edit. It was horror. Fortunately, that was many years ago and now have we many manuals and plugins helping us write clean and readable code.

Websites

PHP has a good community and this smart und helpful people did crate PHP standards. Since this time can we use so many great tools like "composer". This is a website then should know everyone PHP developer:
PHP Standards Recommendations

In first two chapters can you read how should look your code. That is very important to you and another programmers, who will work with your code in the future.

If you work with frameworks the standard may be different, so I recommend you check a framework documentation.

Books

The first book "Clean code" is a bible for programmers. Many developers know this book by heart. If you did not read this book… shame on you!

Of course, you mustn’t use all advice. Sometimes should you go own way, but many Martins tips can you help write good code.

The Second book is "Modern PHP". Author J. Lockhard is one of the founders "PHP The Right Way". Lockhard describes in a clear way, how look moderns PHP coding.

Tools

In PHP world has you two basically tools to checking your code syntax:

PHP Code Sniffer

Code Sniffer check if your code is complaint with PSR or frameworks standards.

PHP Mess Detector

In PHP Mess Detector can you set own rules like maximum number of arguments in functions or variables name length.

Both tools can you use with many IDE’s and editors, for example, VIM or PhpStorm.

At the end I recommend you see how to look popular repository on Github. You can learn many about clear code from other good developers. Good luck!

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Google+ (Opens in new window)

Related

Written by Bartosz Sosna in April 22, 2017 / 1945 Views
Tags | get notice 2017, php, phpstorm
AUTHOR
Bartosz Sosna

I'm Web and App developer. I love gadgets and new technologies. I'm also productivity freak.

You Might Also Like

Make PhpStorm faster

Make PhpStorm faster in two effortless steps

April 2, 2017
Startup Stock Photos

“Image optimizer API” – case study

March 5, 2017
Capistrano

Capistrano – PHP, deploy without stressful

March 16, 2017

No Comment

Please Post Your Comments & Reviews
Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Previous Post
Next Post

Serach

Newsletter

Latest Posts

  • API, Get Noticed 2017, PHP“Image Optimizer API” is ready“Get Notice 2017” contest is over My project “Image Optimizer…May 21, 2017
  • Get Noticed 2017, Quick Tips, zshZ shell (zsh) – better bashWhy zsh is better? I use console from years and…May 18, 2017
  • API, Get Noticed 2017, Quick TipsPostman – powerful tool to work with APIPostman – powerful tool to work with API I’m creating…May 7, 2017
  • Capistrano, Get Noticed 2017, PHP, Quick TipsHow to add tasks to capistranoHow to add tasks to Capistrano I wrote in post…May 5, 2017
  • Get Noticed 2017, MySQL, PHP, Quick TipsPhinx – PHP database migrationWhat is “database migration” I meet migrations first time in…April 30, 2017

STAY UPDATED

About Me

About Me

Web and App developer.

I'm Web and App developer. I love gadgets and new technologies. I'm also productivity freak.

About me (de)

Latest Posts

  • API, Get Noticed 2017, PHP“Image Optimizer API” is ready“Get Notice 2017” contest is over My project “Image Optimizer…May 21, 2017
  • Get Noticed 2017, Quick Tips, zshZ shell (zsh) – better bashWhy zsh is better? I use console from years and…May 18, 2017
  • API, Get Noticed 2017, Quick TipsPostman – powerful tool to work with APIPostman – powerful tool to work with API I’m creating…May 7, 2017
  • Capistrano, Get Noticed 2017, PHP, Quick TipsHow to add tasks to capistranoHow to add tasks to Capistrano I wrote in post…May 5, 2017
  • Get Noticed 2017, MySQL, PHP, Quick TipsPhinx – PHP database migrationWhat is “database migration” I meet migrations first time in…April 30, 2017
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

FOLLOW ME ON TWITTER

  • RT @DamianNaprawa: Festiwal Docker & Kubernetes - DZIEŃ 3 BARTOSZ SOSNA @brtsos Palec wskazujący skierowany w prawo Konfiguracja środowi…33 days ago
  • W końcu MacBook Pro bez bezużytczego touch bara? https://t.co/5tweGBUxP245 days ago
Bartosz Sosna Blog

Copyright © Bartosz Sosna