| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?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
- <constant>Zend_Version::VERSION</constant> that contains a string
- identifying the version number of your Zend Framework installation.
- <constant>Zend_Version::VERSION</constant> might contain "1.7.4", for example.
- </para>
- <para>
- The static method <methodname>Zend_Version::compareVersion($version)</methodname>
- is based on the <acronym>PHP</acronym> function <ulink
- url="http://php.net/version_compare"><methodname>version_compare()</methodname></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>
- <para>
- The static method <methodname>Zend_Version::getLatest()</methodname> provides the version
- number of the last stable release available for download on the site
- <ulink url="http://framework.zend.com/download/latest">Zend Framework</ulink>.
- </para>
- <example id="zend.version.latest.example">
- <title>Example of the getLatest() Method</title>
- <programlisting language="php"><![CDATA[
- // returns 1.11.0 (or a later version)
- echo Zend_Version::getLatest();
- ]]></programlisting>
- </example>
- </sect1>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|