public function version()
    {
        $changelog = @file_get_contents(__DIR__.'/../../changelog.md');

        if (!$changelog) {
            return 'unknown version';
        }

        $matches = strstr($changelog, '## [');
        $until = strpos($matches, '-');

        return str_replace(']', '', substr($matches, 5, $until - 5));
    }
public function version()
    {
        $changelog = @file_get_contents(__DIR__.'/../../changelog.md');

        if (!$changelog) {
            return 'unknown version';
        }

        $matches = strstr($changelog, '## [');
        $until = strpos($matches, '-');

        return str_replace(']', '', substr($matches, 5, $until - 5));
    }
public function version ( ) { $ changelog = @ file_get_contents ( __DIR__ . '/../../changelog.md' ) ; if ( ! $ changelog ) { return 'unknown version' ; } $ matches = strstr ( $ changelog , '## [' ) ; $ until = strpos ( $ matches , '-' ) ; return str_replace ( ']' , '' , substr ( $ matches , 5 , $ until - 5 ) ) ; }
Get version from the changelog.

@return string
Get version from the changelog .