Chapter 14. Zym_Version

Chapter 14. Zym_Version

The class constant Zym_Version::VERSION contains a string that identifies the current version number of Zym Framework that is installed. For example, "0.9.0beta".

The static method Zym_Version::compareVersion($version) is based on the PHP function version_compare(). This method returns -1 if the specified $version is older than the current Zym Framework version, 0 if they are the same, and +1 if the specified $version is newer than the Zym Framework version.

Example 14.1. Example of compareVersion() method

<?php
// returns -1, 0 or 1
$cmp = Zym_Version::compareVersion('1.0.0');