<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect1 id="zend.version.reading">

    <title>Getting the Zend Framework Version</title>

    <para>
        <classname>Zend_Version</classname> provides a class constant
        <classname>Zend_Version::VERSION</classname> that contains a string
        identifying the version number of your Zend Framework installation.
        <classname>Zend_Version::VERSION</classname> might contain "1.7.4", for example.
    </para>

    <para>
        The static method <classname>Zend_Version::compareVersion($version)</classname>
        is based on the PHP function
        <ulink url="http://php.net/version_compare"><code>version_compare()</code></ulink>.
        This method returns -1 if the specified version
        is older than the installed Zend Framework version, 0 if they are the same
        and +1 if the specified version is newer than the
        version of the Zend Framework installation.
    </para>

    <example id="zend.version.reading.example">
        <title>Example of the compareVersion() Method</title>
        <programlisting language="php"><![CDATA[
// returns -1, 0 or 1
$cmp = Zend_Version::compareVersion('2.0.0');
]]></programlisting>
    </example>

</sect1>
<!--
vim:se ts=4 sw=4 et:
-->
