Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

Latest commit

 

History

History
77 lines (55 loc) · 1.6 KB

support-version.md

File metadata and controls

77 lines (55 loc) · 1.6 KB
layout title upgrade keywords
default
Version
#version
registry

Version Component


![](/assets/images/version-{{ pageVersion }}.svg)

Введение

Phalcon\Support\Version is a small but handy class, that returns the current version of Phalcon installed in your system.

Константы

Название Value Описание
VERSION_MAJOR 0 The major version
VERSION_MEDIUM 1 The medium version
VERSION_MINOR 2 The minor version
VERSION_SPECIAL 3 The special version (alpha, beta etc.)
VERSION_SPECIAL_NUMBER 4 The special version number

Методы

protected function getVersion(): array

Return an array with each version part as an element.

<?php

use Phalcon\Support\Version;

$version = new Version();

var_dump($version->getVersion);
// 5.0.0RC4
// [5, 0, 0, 3, 4] 
protected function get(): string

Return the version

<?php

use Phalcon\Support\Version;

$version = new Version();

echo $version->get();
// 5.0.0RC4
protected function getId(): string

Return the version as a number string

<?php

use Phalcon\Support\Version;

$version = new Version();

echo $version->getId();
// 5000034