====== version ======
~~NOTOC~~
== Syntax ==
string[] version()
===== Description =====
The function returns the ADOdb version number.
===== $ADODB_vers =====
This global variable should be considered as a constant.
It contains the **ADOdb version and release date** in the following format:
''vX.Y.Z[-suffix] {date|Unreleased}''
The version number (X = major, Y = minor, Z = hotfix components, separated by dots ''.'') is prefixed with a ''v'', and has an optional //suffix// separated with a dash ''-'' indicating a pre-release version (e.g. ''-beta.1''). The release date in ''yyyy-mm-dd'' format is tagged at the end after 2 spaces.
While under development, a release will have the ''-dev'' suffix, and the date will be replaced by the ''Unreleased'' string, e.g. ''v5.23.0-dev Unreleased''.
The //version()// function extracts the version number from //$ADODB_vers//.
===== Usage =====
Static usage
if (version_compare(ADOConnection::version(), '5.22.0', '>=') {
// latest version specific code
} else {
// backwards compatible code
}
echo $ADODB_vers;
// v5.22.5 2023-04-03
With an active connection object
echo $db->version();
// 5.22.5