5 PHP Tools to make your life more enjoyable.
Tags: php, tool, productivity, codequality
Published: 2018-08-02 14:21:47

---
title: 5 PHP Tools to make your life more enjoyable.
published: true
description: My personal pick of tools to make life more enjoyable.
tags: php, tool, productivity, quality
---

<img class="size-medium aligncenter" src="https://blog.rkl.io/images/b/f/f/7/2/bff72e71d58665e11e48ad802dbeddaf1d7663d9-pexels-photo-276452.jpeg" alt="PHP code" width="900" height="300" />

&nbsp;

<a href="https://en.wikipedia.org/wiki/Tool" target="_blank" rel="noopener">Tools</a>; 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 <a href="http://symfony.com/doc/2.0/components/console/introduction.html" target="_blank" rel="noopener">CLI output parses</a> to full on <a href="https://aws.amazon.com/cloud9/" target="_blank" rel="noopener">SaaS IDE</a>s 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.

<img class="aligncenter size-medium" src="https://upload.wikimedia.org/wikipedia/en/5/5e/Xdebug-logo.png" alt="xDebug" width="200" height="116" />

* <a href="https://xdebug.org/" target="_blank" rel="noopener">xDebug</a> - If you do not use a <a href="https://en.wikipedia.org/wiki/Debugger" target="_blank" rel="noopener">debugger</a>, please, please, please give one a try. If not <a href="https://xdebug.org/" target="_blank" rel="noopener">xDebug</a> (which is the best of bread for PHP in my opinion) then one of the many others. <code>print_r($VAR);exit();</code> 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 <a href="https://www.patreon.com/derickr" target="_blank" rel="noopener">Derick Rethans</a>. <a href="https://xdebug.org/" target="_blank" rel="noopener">xDebug</a> is one of THE best tools for PHP development, hands down. I can not promote this enough.

<img class="aligncenter size-medium" src="https://pbs.twimg.com/profile_images/674918306000711680/3rPeiTKt_400x400.png" width="400" height="400" />

* <a href="https://www.jetbrains.com/phpstorm/" target="_blank" rel="noopener">PHPStorm</a> - 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; <a href="https://www.jetbrains.com/phpstorm/" target="_blank" rel="noopener">PHPStorm</a> 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.

&nbsp;

* <a href="https://github.com/phacility/xhprof" target="_blank" rel="noopener">xhprof</a> &amp; <a href="http://www.brendangregg.com/flamegraphs.html" target="_blank" rel="noopener">flame graphs</a> - Need to find where your program is being slow? <a href="https://en.wikipedia.org/wiki/Profiling_(computer_programming)" target="_blank" rel="noopener">Profiling</a>. Need to trace a request execution? <a href="https://en.wikipedia.org/wiki/Profiling_(computer_programming)" target="_blank" rel="noopener">Profiling</a>. Need to figure out what function/method is called by who? <a href="https://en.wikipedia.org/wiki/Profiling_(computer_programming)" target="_blank" rel="noopener">Profiling</a>. <a href="https://github.com/phacility/xhprof" target="_blank" rel="noopener">xhprof</a> official support may have died but the number of forks are still very much active. Coupled with the <a href="http://www.brendangregg.com/flamegraphs.html" target="_blank" rel="noopener">flame graph</a> scripts the output is not only pretty looking but also very useful.

<img class="aligncenter size-medium" src="https://cdn-images-1.medium.com/max/1600/1*RPgZ7cp4H77ldoLasm7ueA.png" alt="PHPUnit" width="500" height="446" />

* <a href="https://phpunit.de/" target="_blank" rel="noopener">PHPUnit</a> - The one, the only, the bases for the vast majority of all other PHP based testing suits; <a href="https://phpunit.de/" target="_blank" rel="noopener">PHPUnit</a>. If you do testing (and you SHOULD BE) then <a href="https://phpunit.de/" target="_blank" rel="noopener">PHPUnit</a> is your tool.

&nbsp;

* Code Quality tools (<a href="https://github.com/squizlabs/PHP_CodeSniffer" target="_blank" rel="noopener">PHPCS</a> / <a href="https://github.com/sebastianbergmann/phpcpd" target="_blank" rel="noopener">PHPCPD</a> / <a href="https://phpmd.org/" target="_blank" rel="noopener">PHPMD</a>) - 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 <a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks" target="_blank" rel="noopener">GiT pre-commit hook</a>. While not necessary, nor really required, help enforce a level of quality logic output.

&nbsp;

I firmly, and <a href="https://i.imgflip.com/vuovl.jpg" target="_blank" rel="noopener">wholly heartily</a>, believe that leveraging a good tool set during development can make your day-to-day as a software engineer an enjoyable one.

* <a href="https://davidjeddy.com/" target="_blank">Cross posted from my blog.</a>