Skip to content
Ramon Ribeiro edited this page Jan 24, 2020 · 3 revisions

Returns the value for the given key. If the key does not exist, it throws a new DotEnvException:

$env = new DotenvEditor();
try{
     $value = $env->getValue("TESTKEY");
     echo $value;
}catch (DotEnvException $e){
    echo $e->getMessage();
}