Skip to content

Class Phalcon\Version

Source on GitHub

| Namespace | Phalcon |

This class allows to get the installed version of the framework

Constants

const VERSION_MAJOR = 0;
const VERSION_MEDIUM = 1;
const VERSION_MINOR = 2;
const VERSION_SPECIAL = 3;
const VERSION_SPECIAL_NUMBER = 4;

Methods

public static function get(): string;
Returns the active version (string)

echo Phalcon\Version::get();

public static function getId(): string;
Returns the numeric active version

echo Phalcon\Version::getId();

public static function getPart( int $part ): string;
Returns a specific part of the version. If the wrong parameter is passed it will return the full version

echo Phalcon\Version::getPart(
    Phalcon\Version::VERSION_MAJOR
);

protected static function _getVersion(): array;
Area where the version number is set. The format is as follows: ABBCCDE

A - Major version B - Med version (two digits) C - Min version (two digits) D - Special release: 1 = alpha, 2 = beta, 3 = RC, 4 = stable E - Special release version i.e. RC1, Beta2 etc.

@todo Remove in v5 @deprecated Use getVersion()

protected static function getVersion(): array;
Area where the version number is set. The format is as follows: ABBCCDE

A - Major version B - Med version (two digits) C - Min version (two digits) D - Special release: 1 = alpha, 2 = beta, 3 = RC, 4 = stable E - Special release version i.e. RC1, Beta2 etc.