Download the PHP package greencape/php-versions without Composer
On this page you can find all versions of the php package greencape/php-versions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-versions
GreenCape/php-versions
A utility class to provide a list of all PHP versions and their matching xDebug version.
GreenCape/php-versions is designed for use in automated build environments, as it provides the download information for any (stable) PHP version since 3.0.18.
Table of Contents
- Install
- Usage on the Command Line
- Usage as PHP Class
- API
- Contribute
- License
Install
GreenCape/php-versions requires PHP 7.4+ with remote file access, and comes with no dependencies except the Symfony console.
Either download this repository and copy src/php-versions.php
to your project, or use composer
(recommended):
Usage on the Command Line
General Info
Show information about a PHP version
$ php-versions [options] [--] [<php>]
Argument | Description |
---|---|
php | The PHP version to get the info for. Defaults to 'latest' |
Option | Description |
---|---|
-f, --format[=FORMAT] | The output format. Supported values are 'dump' (default), 'json' |
Download URLs
Get the filename or download URL for a PHP version or its signature file
Argument | Description |
---|---|
php | The PHP version to get the info for. Defaults to 'latest' |
Option | Description |
---|---|
--asc | Get the URL for the signature file instead of the PHP source |
-f, --format[=FORMAT] | The requested compression format, one of 'bz2', 'gz', or 'xz' |
-u, --url | If set, the full URL is returned. if not, just the filename |
GPG Keys
Get the GPG keys for a PHP distribution file
Argument | Description |
---|---|
php | The PHP version to get the info for. Defaults to 'latest' |
Hashes
Get the sha256 or md5 hash for a PHP distribution file
Argument | Description |
---|---|
php | The PHP version to get the info for. Defaults to 'latest' |
Option | Description |
---|---|
-f, --format[=FORMAT] | The requested compression format, one of 'bz2', 'gz', or 'xz' |
-t, --type[=TYPE] | The requested hash type, one of 'sha256' (default) or 'md5' |
Versions
Show full version number of a PHP version.
Argument | Description |
---|---|
php | The PHP version to get the info for. Defaults to 'latest' |
Usage as PHP Class
The simplest use-case is to determine the current (latest) version of PHP:
This will output
GreenCape/php-versions provides a couple of access methods. See API sections for more information.
Examples
Get the latest release
Get the latest release of the 5.5 branch
Get the latest release of version 4
Get all release numbers of the 4.4 branch
Output:
Get the download info for PHP 5.2.9
Output:
Get the GPG key(s) for PHP 5.4
Output:
Get the XDebug information for PHP 5.4
Output:
API
See separate API documentation.
Contribute
PRs are welcome. If you encounter any bug or issues, please use the issue tracker.
License
The MIT license (MIT).