Drupal 7 and PHP 5.2
Drupal has long prided itself for staying ahead of the curve technologically. In order to be able to write the best quality Drupal software, Drupal developers need the best programming tools available. Today, the best PHP available is PHP 5.
PHP 5 has been deployed and tested in production environments for three years. Unfortunately, web hosts have been slow to adopt PHP 5, which has made it difficult for Drupal and many other PHP projects to fully embrace PHP 5's features.
Now a growing consortium of PHP projects have joined together and push for wider PHP 5 adoption. By all embracing PHP 5 together, the projects involved in the GoPHP 5 effort are sending a message to web hosts that it is time to embrace PHP's future.
Drupal is now part of that movement.
After much deliberation, the Drupal project is committed to the following path:
- As of Drupal 7, changes to Drupal which use language features found exclusively in PHP 5.2 will be considered for acceptance into Drupal core.
- This policy effectively means that Drupal 7 will be incompatible with PHP 4.
The Drupal developer community agrees that this change is best for the future of Drupal. We are excited by the potential that PHP 5 brings, and we look forward to building better software for the community.
Drupal 6 and PHP 4
The upcoming Drupal 6 and all current Drupal releases will remain PHP 4-compatible for as long as they are supported.
In Drupal 6, contributed Drupal modules and themes may declare their PHP version compatibility. Contributed modules can only be installed on systems that support the required PHP version. This change will allow developers to leverage PHP 5 features without breaking existing Drupal sites. This feature will let Drupal users evaluate the advantages of moving their sites to PHP 5.
The benefits and features of PHP 5.2
Benefits and features include the following:
- Improved performance and a more accurate memory usage.
- Better security through the filter extension.
- ZIP extension for creating and editing zip files.
- Hooks for tracking file upload progress were introduced (will let us write an accurate progress tracker for file uploads.)
- DateTime and DateTimeZone objects with methods to manipulate date/time information.
- SQLite has been bundled with PHP.
- Vastly improved XML support (critical for many things, including feeds and aggregation.)
- Real opportunities for object oriented programming.
Further reading
For more background and further reading, please see the following resources.http://gophp5.org/http://buytaert.net/php-is-dead-long-live-phphttp://www.php.net/ChangeLog-5.phphttp://lists.drupal.org/pipermail/development/2007-May/024073.htmlhttp://lists.drupal.org/pipermail/development/2007-June/024432.html