Symfony\Component\Intl\Util\Version::normalize
Normalizes a version string to the number of components given in the parameter $precision.
Examples: Version::normalize('1.2.3', 1); // => '1' Version::normalize('1.2.3', 2); // => '1.2'
Signature
public function normalize(string
$version,
integer|null
$precision )
Parameters
$version
— string- A version string.
$precision
— object- The number of components to include. Pass
NULL to return the version unchanged.
Returns
- string|null
- The normalized version or NULL if it couldn't be
normalized.