Navigation

Search

matchPackageVersion

Description

Checks if version matches any of the versions in versions.

Syntax

bool matchPackageVersion (string $version, array $versions)



Parameter $version

Expected type: String
Description: The version to match



Parameter $versions

Expected type: Array
Description: An array of versions that $version should be matched against



Return value

Expected type: Boolean
Description: Whether or not the versions matched


Notes

  • Supports comma separated version numbers, with or without whitespace.
  • Supports lower and upper bounds. (1.0-1.2)
  • Returns true if the version matched.
  • Compares any previous version(s) of a package that you have installed with the "from" parameter of an upgrade tag
  • Compares your SMF version with the "for" parameter of an install, uninstall or upgrade tag.
View all versions of this function