Getting the Zend Framework VersionΒΆ

Zend_Version provides a class constant Zend_Version::VERSION that contains a string identifying the version number of your Zend Framework installation. Zend_Version::VERSION might contain “1.7.4”, for example.

The static method Zend_Version::compareVersion($version) is based on the PHP function version_compare(). 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.

Example of the compareVersion() Method

1
2
// returns -1, 0 or 1
$cmp = Zend_Version::compareVersion('2.0.0');

The static method Zend_Version::getLatest() provides the version number of the last stable release available for download on the site Zend Framework.

Example of the getLatest() Method

1
2
// returns 1.11.0 (or a later version)
echo Zend_Version::getLatest();

Project Versions

This Page

Note: You need to stay logged into your GitHub account to contribute to the documentation.

Edit this document

Edit this document

The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.

  1. Login with your GitHub account.
  2. Go to Getting the Zend Framework Version on GitHub.
  3. Edit file contents using GitHub's text editor in your web browser
  4. Fill in the Commit message text box at the end of the page telling why you did the changes. Press Propose file change button next to it when done.
  5. On Send a pull request page you don't need to fill in text anymore. Just press Send pull request button.
  6. Your changes are now queued for review under project's Pull requests tab on GitHub.