CommunityJetBrains ProductsPHPPrograms / SoftwareTesting Tools

5 PHP Tools to make your life more enjoyable.

PHP code

 

Tools; they can make your life amazingly productive or hellishly frustrating. Over the past decade I have had the privilege to use a wide range of tools. From CLI output parses to full on SaaS IDEs with 3rd party service integrations to automatic code style fixers. Some are better than others, some more mature than others. Here I would like to share with you my 5 go to tools. When starting up a projects these tools make my life, personally, an enjoyable ride down the PHP road.

xDebug

* xDebug – If you do not use a debugger, please, please, please give one a try. If not xDebug (which is the best of bread for PHP in my opinion) then one of the many others. print_r($VAR);exit(); is a time waster. Break points are the way to go, request stepping, variable watching. These things save you time and frustration. The amount of time debuggers has saved me it worth whatever it costs to show appreciation to Derick Rethans. xDebug is one of THE best tools for PHP development, hands down. I can not promote this enough.

* PHPStorm – When it comes to development a good IDE is a requirement. While we could go on for hours with the difference between an editor and an IDE; PHPStorm is a professional IDE. Tool integration, type hinting, productivity enhancements. It’s all there. In addition to an very community active vendor and community there is literally nothing in the plugin library that you could need and not find.

 

* xhprof & flame graphs – Need to find where your program is being slow? Profiling. Need to trace a request execution? Profiling. Need to figure out what function/method is called by who? Profiling. xhprof official support may have died but the number of forks are still very much active. Coupled with the flame graph scripts the output is not only pretty looking but also very useful.

PHPUnit

* PHPUnit – The one, the only, the bases for the vast majority of all other PHP based testing suits; PHPUnit. If you do testing (and you SHOULD BE) then PHPUnit is your tool.

 

* Code Quality tools (PHPCS / PHPCPD / PHPMD) – While I try to program at a level of professionalism mistakes happen. An extra space here, and badly designed method there. Tools like these help you produce the best code logic possible. I often trigger these type of tools via a GiT pre-commit hook. While not necessary, nor really required, help enforce a level of quality logic output.

 

I firmly, and wholly heartily, believe that leveraging a good tool set during development can make your day-to-day as a software engineer an enjoyable one.

Subscribe my newsletter to stay up to date or feel free to leave a comment below.