verison modified to be used in PHP 5.2.x