Why PHP 5 Rocks

by on July 8th, 2007

PHP 5, is the first major release of PHP in years to focus on new features. While one of the key goals behind PHP 3 was increasing PHP/FI 2.0’s performance and efficiency, at the same time it introduced a whole new set of functionality. That was back in 1998. PHP 4 provided another speed burst, as it introduced the Zend Engine. However, the majority of PHP 4’s changes were behind the scenes. Those features allowed more people than ever to use PHP, but it didn’t provide them with more tools to build their sites. Finally, after six years, the community has revisited the legacy baggage that made tackling some problems unnecessarily difficult.

In particular, PHP 4’s version of object-oriented programming (OOP) lacks many features, the MySQL extension doesn’t support the new MySQL 4.1 client protocol, and XML support is a hodgepodge. Fortunately, PHP 5 improves on PHP 4 in following major areas:

Robust Support for Object-Oriented Programming

It offers:

Public, protected, and private properties and methods
Abstract classes
Class type hints
Static properties and methods
Final properties and methods
A whole suite of magical methods

A Completely Rewritten MySQL Extension
A Suite of Interoperable XML Tools
An Embedded Database with SQLite
Cleaner Error Handling with Exceptions
A First-Class SOAP Implementation