PhpBrew\Version::__construct PHP Method

__construct() public method

can be hhvm
public __construct ( $a, $dist = null )
    public function __construct($a, $dist = null)
    {
        // XXX: support stability flag.
        if (preg_match('/^(\\w+)-(.*?)$/', $a, $regs)) {
            $this->dist = $dist ?: $regs[1];
            $this->setVersion($regs[2]);
        } else {
            $this->setVersion($a);
            $this->dist = $dist ?: 'php';
            // default dist name to PHP
        }
    }