Skip to content

Instantly share code, notes, and snippets.

@igorw
Created October 1, 2013 13:57
Show Gist options
  • Save igorw/6778832 to your computer and use it in GitHub Desktop.
Save igorw/6778832 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