Showing posts with label PHP Programmer. Show all posts
Showing posts with label PHP Programmer. Show all posts

Saturday, December 3, 2011

Tools For PHP programmer



List of tools that every PHP programmer should know about.

Phing – a project build system

Phing is a project build system based on Apache ANT. The name is a recursive acronym, of sorts, that stands for PHing IsNot GNU make. Phing can do anything a traditional build system like GNU make can do, but without the steep learning curve.
The idea behind phing (and other build tools) is to evaluate a set of dependencies, then execute a set of PHP classes to properly install and configure an application. The build process is controlled by a simple XML configuration file. Out of the box, phing can perform token replacement (e.g., to change include paths on your development and production systems), execute SQL, move and copy files, run shell scripts, and more. You can also create your own custom tasks by extending the “task” class included with the package.
Phing is an invaluable tool for anyone who needs to deploy large scale PHP applications on more than a single server. But I’ve found it useful for simple scripts, too.

Xdebug – debugger and profiler tool


Xdebug is a PHP extension that helps you debug and profile scripts. Among the most useful features of Xdebug are the new notice, warning, and error messages that are displayed after activation. If a script fails to execute properly, Xdebug will print a full stack trace in the error message, along with function names, parameter values, source files, and line numbers. A welcome feature for developers who are tired of the skimpy error reports from a default PHP install.
The extension has a number of more advanced features that allow developers to perform code coverage analysis, collect profiling information, and debug scripts interactively. The profiling functionality is particularly useful. The profiler uses a common output file format, allowing you to use tools like KCacheGrind to quickly find bottlenecks in your code. A good profiler is an essential tool for any serious developer, as it allows you to properly optimize your code while avoiding the hazards of premature optimization.

PHPUnit – unit testing framework

PHPUnit is a lightweight testing framework for PHP. It’s a complete port of JUnit 3.8.1 for PHP5, and is a member of the xUnit family of testing frameworks (which are based on a design by software patterns pioneer Kent Beck).
Unit tests form the foundation of several modern agile development methodologies, making PHPUnit a vital tool for many large scale PHP projects. The tool can also be used to generate code coverage reports using the Xdebug extension discussed earlier, and integrates with phing to automate testing.

Propel – object-relational mapping framework