src/Jackiedo/DotenvEditor/DotenvEditor.php
public function getKeys($keys = [])
    {
        $allKeys = $this->reader->keys();

        return array_filter($allKeys, function ($key) use ($keys) {
            if (!empty($keys)) {
                return in_array($key, $keys);
            }
            return true;
        }, ARRAY_FILTER_USE_KEY);
    }
public function getKeys($keys = [])
    {
        $allKeys = $this->reader->keys();

        return array_filter($allKeys, function ($key) use ($keys) {
            if (!empty($keys)) {
                return in_array($key, $keys);
            }
            return true;
        }, ARRAY_FILTER_USE_KEY);
    }
Get all or exists given keys in file content

@param  array  $keys

@return array