Programmer's Reference Guide

Zend_Version

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 #1 Example of the compareVersion() Method

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

Zend_Version

+ Add A Comment

If you have a JIRA/Crowd account, we suggest you login first before commenting.
  • BBCode is allowed in the comment markup

  •   ______    _____    _    _      ___      ______  
     /_   _//  |  ___|| | \  / ||   / _ \\   /_   _// 
     `-| |,-   | ||__   |  \/  ||  / //\ \\  `-| |,-  
       | ||    | ||__   | .  . || |  ___  ||   | ||   
       |_||    |_____|| |_|\/|_|| |_||  |_||   |_||   
       `-`'    `-----`  `-`  `-`  `-`   `-`    `-`'   
                                                      
    
  • Select a Version

    Languages Available

    Components

    Search the Manual