[MANUAL] English:
[zend.git] / documentation / manual / en / module_specs / Zend_Version.xml
blob5616629c38b9e0b72c9034fe14e8fb69aa8d04b9
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect1 id="zend.version.reading">
4     <title>Getting the Zend Framework Version</title>
6     <para>
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.
11     </para>
13     <para>
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.
21     </para>
23     <example id="zend.version.reading.example">
24         <title>Example of the compareVersion() Method</title>
26         <programlisting language="php"><![CDATA[
27 // returns -1, 0 or 1
28 $cmp = Zend_Version::compareVersion('2.0.0');
29 ]]></programlisting>
30     </example>
31 </sect1>
32 <!--
33 vim:se ts=4 sw=4 et:
34 -->