Archive for February, 2007

PHP 5.2.1 Released – Time to Upgrade?

Thursday, February 15th, 2007

PHP 5.2.1 was officially released yesterday, and it is possibly the time for PHP 4 die-hards or PHP 5/5.1 users to upgrade. Why? Consider the following:

New Features in PHP 5.2.1

  • New Extensions
    • JSON (JavaScript Object Notation)
    • Filter Extension (simple input validation)
    • ZIP (Full zip compression support read & write)
    • Date (date manipulation functions/objects)
  • __toString() now works everywhere
  • E_RECOVERABLE_ERROR (fewer fatal errors)
  • New SPL features (Regex Iterators, SplFileObject CSV support, Caching Iterator)
  • Data: stream support
  • And many other “minor” features

Performance Enchantments

  • New & Improved Memory Manager + Heap Protection
  • Faster include/require_once
  • Optimized str_replace() and implode() functions
  • Faster try {} catch {} blocks
  • Significantly faster performance on Win32
  • Optimized shutdown sequence
  • Many other optimizations

Improved Security

  • New configuration option allow_url_include (disabled by default)
  • Over 40 security fixes compared to any prior release.
  • More accurate memory usage tracking
  • Filter extension can help filter out hostile input preventing
  • XSS, SQL Injection and other nastiness.
  • Memory limit is always enabled.

Improved Stability

  • PHP 5.2.1 includes hundreds of bug fixes compared to previous releases, over 300 since 5.1.6
  • Chances are that if you’ve reported a PHP bug in the last 6-8 months, PHP 5.2.1 has the fix for it.

If you are interested in migrating from earlier versions of PHP please see the guide provided by Ilia Alshanetsky.