Zend_Version.xml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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>
  5. <para>
  6. <classname>Zend_Version</classname> provides a class constant
  7. <classname>Zend_Version::VERSION</classname> that contains a string
  8. identifying the version number of your Zend Framework installation.
  9. <classname>Zend_Version::VERSION</classname> might contain "1.7.4", for example.
  10. </para>
  11. <para>
  12. The static method <classname>Zend_Version::compareVersion($version)</classname>
  13. is based on the PHP function
  14. <ulink url="http://php.net/version_compare"><code>version_compare()</code></ulink>.
  15. This method returns -1 if the specified version
  16. is older than the installed Zend Framework version, 0 if they are the same
  17. and +1 if the specified version is newer than the
  18. version of the Zend Framework installation.
  19. </para>
  20. <example id="zend.version.reading.example">
  21. <title>Example of the compareVersion() Method</title>
  22. <programlisting language="php"><![CDATA[
  23. // returns -1, 0 or 1
  24. $cmp = Zend_Version::compareVersion('2.0.0');
  25. ]]></programlisting>
  26. </example>
  27. </sect1>
  28. <!--
  29. vim:se ts=4 sw=4 et:
  30. -->