PHPackages                             saaiph/dotenv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. saaiph/dotenv

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

saaiph/dotenv
=============

Leitura de arquivo em desenvolvimento

1.0(7y ago)012MITPHP

Since May 17Pushed 7y agoCompare

[ Source](https://github.com/saaiph/dotenv)[ Packagist](https://packagist.org/packages/saaiph/dotenv)[ RSS](/packages/saaiph-dotenv/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)DependenciesVersions (2)Used By (0)

[![](https://user-images.githubusercontent.com/33224319/57905337-95f1a500-784c-11e9-83c2-34c96465f5fd.jpg)](https://user-images.githubusercontent.com/33224319/57905337-95f1a500-784c-11e9-83c2-34c96465f5fd.jpg)

 Dotenv
========

[](#-dotenv-)

 [ ![](https://camo.githubusercontent.com/b9791c35e30a88f26c1bd269393ddb09e69672d1b8ce4e81d6b07fb7c30d00aa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656c656173652d76312e302d677265656e2e737667) ](https://github.com/saaiph/saaiph/releases) [ ![](https://camo.githubusercontent.com/b25c1531aafbc7aef38bedd32f480f2b8b7945fdd0c59843af48a9e4504e234f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e312e322d707572706c652e737667) ](http://php.net) [ ![](https://camo.githubusercontent.com/33b959372ddaaeae443ed09490219c9ac31dfbaa302d5413f22f7adf3837ef21/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c642d537563636573732d477265656e2e737667) ](https://github.com/saaiph/saaiph/releases) [ ![](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667) ](https://lbesson.mit-license.org/)

Leitura de do arquivo .env ou outros;
-------------------------------------

[](#leitura-de-do-arquivo-env-ou-outros)

Estrutura do Arquivo .env

```
Criando variavel no arquivo .env
VARIAVEL="ValorDaVariavel"

Comentários no arquivo, usando o "#"
#Comentário aqui

```

### Usando com Composer

[](#usando-com-composer)

Necessário o uso do composer!

&gt; composer require saaiph/dotenv > Instanciado a classe e lendo o arquivo .env na pasta raiz do projeto.

```
use Saaiph\Dotenv\Dotenv;

$dotenv = new Dotenv(__DIR__."/.env");
$dotenv->load();
```

### Instância da váriavel globalmente com $\_ENV

[](#instância-da-váriavel-globalmente-com-_env)

```
echo $_ENV['VARIAVEL'];
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2555d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2c5cb9d6271d7ca50d6a636a505c4ff54777f847525fecf4150008dc3254e93?d=identicon)[danieljuniorce](/maintainers/danieljuniorce)

---

Top Contributors

[![danieljuniorce](https://avatars.githubusercontent.com/u/33224319?v=4)](https://github.com/danieljuniorce "danieljuniorce (6 commits)")

### Embed Badge

![Health badge](/badges/saaiph-dotenv/health.svg)

```
[![Health](https://phpackages.com/badges/saaiph-dotenv/health.svg)](https://phpackages.com/packages/saaiph-dotenv)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
