Skip to content

Instantly share code, notes, and snippets.

@lolautruche
Forked from igorw/gist:6778832
Created October 2, 2013 08:43
Show Gist options
  • Save lolautruche/6790805 to your computer and use it in GitHub Desktop.
Save lolautruche/6790805 to your computer and use it in GitHub Desktop.
<?php
use Composer\Package\Version\VersionParser;
require 'vendor/autoload.php';
$parser = new VersionParser();
$constraint = $parser->parseConstraints('2013.09.*');
$single = $parser->parseConstraints('v2013.09.0');
var_dump($constraint);
var_dump($single);
var_dump($constraint->matches($single));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment