PHP code example of typisttech / php-matrix

1. Go to this page and download the library: Download typisttech/php-matrix library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

typisttech / php-matrix example snippets

console
$ php-matrix "^7 || ^8"
{
    "constraint": "^7 || ^8",
    "versions": [
        "7.0",
        "7.1",
        "7.2",
        "7.3",
        "7.4",
        "8.0",
        "8.1",
        "8.2",
        "8.3",
        "8.4"
    ],
    "lowest": "7.0",
    "highest": "8.4"
}

$ php-matrix --mode=full  "~7.4.29 || ~8.1.29"
{
    "constraint": "~7.4.29 || ~8.1.29",
    "versions": [
        "7.4.29",
        "7.4.30",
        "7.4.32",
        "7.4.33",
        "8.1.29",
        "8.1.30",
        "8.1.31"
    ],
    "lowest": "7.4.29",
    "highest": "8.1.31"
}

$ php-matrix --mode=minor-only  ">=7.2 <8.4"
{
    "constraint": ">=7.2 <8.4",
    "versions": [
        "7.2",
        "7.3",
        "7.4",
        "8.0",
        "8.1",
        "8.2",
        "8.3"
    ],
    "lowest": "7.2",
    "highest": "8.3"
}
bash
composer global 
bash
composer create-project typisttech/php-matrix
cd php-matrix
./bin/php-matrix --help