1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect1 id="zend.version.reading">
4 <title>Getting the Zend Framework Version</title>
7 <classname>Zend_Version</classname> provides a class constant
8 <constant>Zend_Version::VERSION</constant> that contains a string
9 identifying the version number of your Zend Framework installation.
10 <constant>Zend_Version::VERSION</constant> might contain "1.7.4", for example.
14 The static method <methodname>Zend_Version::compareVersion($version)</methodname>
15 is based on the <acronym>PHP</acronym> function <ulink
16 url="http://php.net/version_compare"><methodname>version_compare()</methodname></ulink>.
17 This method returns -1 if the specified version
18 is older than the installed Zend Framework version, 0 if they are the same
19 and +1 if the specified version is newer than the
20 version of the Zend Framework installation.
23 <example id="zend.version.reading.example">
24 <title>Example of the compareVersion() Method</title>
26 <programlisting language="php"><![CDATA[
28 $cmp = Zend_Version::compareVersion('2.0.0');