Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Php.getVersion

Php.getVersion($options = {}) -> string|number

Description

Return the PHP version.

Php.getVersion()
//= '7.2.13'

Options

Option Value Description
num true/false Return the version as a number that can be easily compared.
Php.getVersion(-num)
//= 70213

if Php.getVersion(-num) >= 70300 {
    print('You are using PHP 7.3+')
}

See Also