-
Notifications
You must be signed in to change notification settings - Fork 1
Functions
Mark Weiman edited this page Feb 17, 2017
·
3 revisions
This extension provides three functions, alpm_vercmp()
, alpm_version()
, and php_alpm_version()
.
- Parameters: Two, a (string) and b (string)
- Returns: -1 if a is newer, 0 if both newer, 1 if b is newer
- Example:
echo alpm_vercmp("1.2.4-1", "1.5.3-2"); /* 1 */
echo alpm_vercmp("1:1.5.2-1", "6.22.3-2"); /* -1 */
echo alpm_vercmp("1.2-1", "1.2-1"); /* 0 */
- Parameters: None
- Returns: Version of libalpm installed on the machine (String)
- Example:
echo alpm_version(); /* echos "10.0.1" as of 2016-07-25 on an up to date Arch Linux system */
- Parameters: None
- Returns: Version of this extension (String)
- Example
echo php_alpm_version() /* echos "0.1" */