فصل 34. Zend_Version

قائمة المحتويات

34.1. Reading the Zend Framework Version

34.1. Reading the Zend Framework Version

The class constant Zend_Version::VERSION contains a string that identifies the current version number of Zend Framework. For example, "0.9.0beta".

The static method Zend_Version::compareVersion($version) is based on the PHP function version_compare(). The method returns -1 if the specified $version is older than the Zend Framework version, 0 if they are the same, and +1 if the specified $version is newer than the Zend Framework version.

مثال 34.1. Example of compareVersion() method

<?php

// returns -1, 0 or 1
$cmp = Zend_Version::compareVersion('1.0.0');

?>