PHP code example of milpa / core

1. Go to this page and download the library: Download milpa/core 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/ */

    

milpa / core example snippets


use Milpa\ValueObjects\SemanticVersion;

$v = SemanticVersion::parse('2.4.1');

$v->satisfies('^2.0');                              // true
$v->greaterThan(SemanticVersion::parse('2.4.0'));   // true
$v->incrementMinor();                              // 2.5.0 (a new instance)
$v->isStable();                                    // true — no pre-release tag

$matcher->identityMatches($provision, $rement);         // …and does the contract version fit?