public static function getVariables($matches, &$vars = null)
    {
        if (!$matches) {
            return [];
        }

        if ($vars === null) {
            $vars = [];
        }

        foreach ($matches as $i => $var) {
            if (is_numeric($i)) {
                continue;
            }

            if (strpos((string) $var, '/') !== false) {
                $var = explode('/', (string) $var);
            }

            $vars[$i] = $var;
        }

        return $vars;
    }
public static function getVariables($matches, &$vars = null)
    {
        if (!$matches) {
            return [];
        }

        if ($vars === null) {
            $vars = [];
        }

        foreach ($matches as $i => $var) {
            if (is_numeric($i)) {
                continue;
            }

            if (strpos((string) $var, '/') !== false) {
                $var = explode('/', (string) $var);
            }

            $vars[$i] = $var;
        }

        return $vars;
    }
public static function getVariables ( $ matches , & $ vars = null ) { if ( ! $ matches ) { return [ ] ; } if ( $ vars === null ) { $ vars = [ ] ; } foreach ( $ matches as $ i => $ var ) { if ( is_numeric ( $ i ) ) { continue ; } if ( strpos ( ( string ) $ var , '/' ) !== false ) { $ var = explode ( '/' , ( string ) $ var ) ; } $ vars [ $ i ] = $ var ; } return $ vars ; }
Get variables from regex matched result.

@param array $matches Regex matched result.
@param array &$vars   Variables to store data.

@return  array
Get variables from regex matched result .