Dropping PHP 3 compatibility has allowed us to secure and optimize the codebase which has proven to be a beneficial step during the 2.2 development path.
We are interested in further dropping support for PHP 4.0 webservers, to take advantage of the offerings PHP 4.1 brings, to further strengthen and optimize the core codebase.
The main changes dropping PHP 4.0.x support bring will be the removal of the session and session_compatible classes, and utilizing session variables natively with the super global $_SESSION variable. The great thing about doing this is not only cleaner code, but also natively using the session support PHP brings, and using native PHP session functions to control the storage of session data (file-, database-, memory-, .. based).
It will also allow the removal of PHP 4.0 compatibility code that sets the compatibility super global variables as globals within functions and class methods. Example:
function some_function() {
if (PHP_VERSION < 4.1) {
global $_GET;
}
....
}
This would then allow the use of super global variables as intended.
A further benefit dropping 4.0.x support is utilizing sprintf() to it's full potential, in regard with argument swapping.
This is important for the language support osCommerce has, as it allows the following scenario:
$format = "The %2\$s contains %1\$d monkeys."; printf($format, 3, 'zoo');
Support for argument swapping was brought in PHP 4.0.6. We think this is an important feature to have for multilingual support, and think if a PHP 4.0.6 requirement is needed, that it should be done at the 4.1 level to gain benefit in other areas of the core codebase.
We would like to hear your thoughts on this issue, as we don't want to leave anyone behind, but also need to "get with the times" due to the long development cycle 2.2 has.
Edited by hpdl, 12 March 2005 - 05:08 PM.










