#native_company# #native_desc#
#native_cta#

10 Productivity-boosting Tools for Your PHP Development

By W. Jason Gilmore
on August 24, 2010

Frustration can quickly set in when you are dealing with menial and often repetitive tasks such as manual code testing and deployment, yet you strive to become a more efficient programmer by staying DRY. So why not extend that quest to other parts of the application lifecycle, streamlining and automating such tasks? In this article I’ll introduce you to ten PHP development tools that will help you do exactly that, leaving you with more time to concentrate on building great websites.

1. PHPUnit

Testing is a crucial part of the application development process, yet many developers give it short shrift because the task can be enormously time-consuming, plodding and error prone. To combat these issues, automated testing tools give developers the ability to write a series of testing scripts, which can be easily executed on a whim or even according to a predefined schedule. These tools also often provide a reporting feature, which details the outcome of each test run.
PHP developers have long had a great automated testing framework at their disposal known as PHPUnit. Based on the popular code-driven approach to testing known as xUnit, PHPUnit allows developers to actually write tests using familiar PHP syntax, and then execute these tests using a simple command-line utility. You can even integrate PHPUnit into continuous integration tools such as phpUnderControl (discussed further later in this article).
If you’re unfamiliar with PHPUnit, check out the previously published article titled Use PHPUnit to Implement Unit Testing in Your PHP Development, which introduces the topic of automated testing using this great open source utility.

2. Phing

As a Web development project’s complexity grows, developers face a number of deployment tasks that go beyond merely transferring files from the development to production server. Avoiding transferring development-specific files such as graphic templates, dealing with server-specific file permissions and configuration parameters such as database connection usernames and passwords, and figuring out how to revert changes quickly should the deployment not go as expected are all issues repeatedly faced by developers when deploying a site.
To combat these issues, developers employ build systems, which cannot make the file-transfer process much more efficient by synchronizing only those files that have changed. Build systems are also capable of following highly customized deployment procedures, which can vary according to the environment you’re targeting. If you’re not currently taking advantage of such a system, check out Phing, a build system modeled after the Apache Ant project. Supported on all major platforms — Windows included — Phing tasks can be easily configured using a simple XML syntax, and can manipulate the server file system, integrate with CVS and Subversion, and even create PEAR packages from your custom libraries.

3. GitHub

On more than one occasion I’ve promoted the benefits of using version control to manage your source code. Version control brings a number of advantages to any project, including the ability to experiment with code branches, roll back unwanted changes, determine which team member most recently changed a particular file, and monitor progress through logging. Although many open source version control tools are widely used, Git is the current darling of the day and happens to be my personal tool of choice.
Part of the reason for Git’s rise has to do with a third-party service called GitHub, which offers users an impressive array of repository hosting services. GitHub relieves development teams of the need to manage a server repository locally and even offers free hosting services for open source projects, with a negligible fee structure in place for commercial hosting. Having quickly surpassed 1 million hosted repositories, GitHub presents a tremendous value for developers seeking to shift otherwise costly and time-consuming administrative tasks to a capable third party.

4. FirePHP

Many developers are familiar with the popular Firefox add-on Firebug, which allows you to easily inspect and experiment with a website’s HTML, CSS and JavaScript. Using FirePHP, you can also use the familiar Firebug interface to review PHP errors and other analytical data of your choosing.
If you’d like to learn more about what Firebug and FirePHP have to offer, check out the article “Firebug: Add Browser-based Debugging to Your Ajax Development”.

5. XDebug

While using automated testing tools such as PHPUnit will help you catch mistakes after the code has been written, sometimes you’ll need some extra assistance in determining the cause of these problems. Many PHP developers rely upon a great open source debugging tool named XDebug, which can help you to examine the status of your code by providing utilities for tracing execution, profiling code performance, reviewing object contents, and much more.
If you’re unfamiliar with XDebug, check out the recently published introductory tutorial, A Sanity-Saving Debugging Solution for Your PHP Development.