Version
class Version (View source)
Properties
| static protected string | $pattern | ||
| string | $major | ||
| string | $minor | ||
| string | $patch | ||
| array|null | $prerelease | ||
| array|null | $build |
Methods
__construct(string $version)
Parse version format
array|int|string|null
__get(string $name)
Get value for a version component
__set(string $name, array|int|string|null $value)
Set value for a version component
string
__toString()
Compose string
static bool
valid(string $version)
Validate string version
Details
__construct(string $version)
Parse version format
int
compare(Version $version)
Compare current version with another version
array|int|string|null
__get(string $name)
Get value for a version component
__set(string $name, array|int|string|null $value)
Set value for a version component
string
__toString()
Compose string
static bool
valid(string $version)
Validate string version