1. Go to this page and download the library: Download andrelohmann/semver 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/ */
andrelohmann / semver example snippets
namespace League\SemVer;
interface Parser
{
/**
* @param string $version
* @return Version
*/
function parse($version);
/**
* @param string $version
* @return bool
*/
function isValidVersion($version);
}
$parser = new League\SemVer\RegexParser();
var_dump($parser->parse('not a valid version'));
var_dump($parser->parse('1.0.0-alpha.1+48e4f51e0b2751ec3bc4a2bde809e46d60eb1d6e'));