mlocati / powershell-phpmanager

A PowerShell module to install/update PHP, PHP extensions and Composer on Windows

Home Page:https://www.powershellgallery.com/packages/PhpManager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

command for current php versions

ltdeta opened this issue · comments

Is it possible to add a function to query the current stable php versions?

some examples

Versions-Php 7

result: 7.0.33 / 7.1.27 / 7.2.16 / 7.3.3

Versions-Php 7.2*

result: 7.2.16

Versions-Php 5.6*

result: 5.6.40

You can use the Get-PhpAvailableVersion function. For example, to get the latest 7.2 version, you can use this line:

Get-PhpAvailableVersion Release | Where-Object { $_.Version -match '^7\.2\.' } | Select-Object -Last 1 | Select-Object Version

ok, thanks