mirror of
https://github.com/danog/php.git
synced 2024-11-27 04:14:56 +01:00
12 lines
274 B
Plaintext
12 lines
274 B
Plaintext
def version_id:
|
|
# https://www.php.net/phpversion
|
|
# $version_id = $major_version * 10000 + $minor_version * 100 + $release_version;
|
|
sub("[a-zA-Z].*$"; "")
|
|
| split(".")
|
|
| (
|
|
(.[0] // 0 | tonumber) * 10000
|
|
+ (.[1] // 0 | tonumber) * 100
|
|
+ (.[2] // 0 | tonumber)
|
|
)
|
|
;
|