PHP Semver

Copyable

This trait adds the copy method to Version.

Table of Contents

Methods

copy()  : Version
Constructs a copy of the version. The copied object's properties can be altered with the optional parameters.

Methods

copy()

Constructs a copy of the version. The copied object's properties can be altered with the optional parameters.

public copy([null|int $major = null ][, null|int $minor = null ][, null|int $patch = null ][, null|string $preRelease = null ][, null|string $buildMeta = null ]) : Version
Parameters
$major : null|int = null

the major version number

$minor : null|int = null

the minor version number

$patch : null|int = null

the patch version number

$preRelease : null|string = null

the pre-release part

$buildMeta : null|string = null

the build metadata

Tags
throws
SemverException

when the version parts are invalid

Return values
Version

the new version


        
On this page

Search results