Blog Post RSS ?

Blogs » PHP » PHP 5.1’s Killer Feature?
 

PHP 5.1’s Killer Feature?

by Kevin Yank

PHP 4 didn’t really catch fire in terms of real-world server support until its first major update, version 4.1. Will the same be true of PHP 5, the first point release of which is now in its early beta stages?

PHP 5.1 Beta 1 has been out for ten days, and Beta 2 has just become available. Neither of these releases has yet been announced on php.net, nor has an official list of changes been posted, but if you’re especially curious you can read the detailed breakdown maintained by the developers.

Upon its release in early 2002, PHP 4.1 made some important changes to the language. It was the first release that recommended register_globals be switched off to improve security. The long-named variables like $HTTP_GET_VARS for accessing submitted values securely were replaced with shorter, more convenient superglobal variables like $_GET. All up, PHP 4.1 almost had a greater impact on the way developers used PHP than the major 4.0 release did.

At this stage, PHP 5.1 is not looking to be quite as spectacular. Some enhancements to Perl regular expressions, a few extra array functions… nothing to write home about. But there is one significant enhancement to PHP in 5.1: PHP Data Objects (PDO).

The PDO library lets you access any of an extensive selection of supported databases using a signle set of functions. So not only do you only need to learn one set of functions to write for multiple databases, but you can transition an application to another database without having to change all the functions throughout your code.

PHP developers have been achieving this for years using database abstraction layers, at first homegrown, then open source, and finally official. This is the first time such an abstraction layer will be completely built into PHP, and not a layer of PHP code sitting on top of it, however.

Could this be the killer feature that draws developers to PHP 5.1 when real-world adoption of PHP 5 is still lagging? If you feel like trying out PDO to decide for yourself, a good place to start is the lead developer’s blog.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. Introducing Bucket: A Minimal Dependency Injection Container for PHP Troels got fed up with the lack of a decent...
  2. Ready for PHP & MySQL Week at SitePoint? To celebrate the release of the new edition of well-loved...
  3. How to Use PHP Namespaces, Part 1: The Basics In the first part of a series of articles, Craig...
  4. Are PHP Namespaces Really So Bad? Namespaces have caused a divide amongst developers who either love...
  5. Free PHP Webinar: How to Increase Performance with Caching Zend are running a free webinar today, with a live...

This post has 33 responses so far

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow SitePoint on...