PHPackages                             m4rku5/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. m4rku5/dotenv

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

m4rku5/dotenv
=============

A tool to manage dotenv files

12PHP

Since Sep 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/M4RKU5-C0D3/dotenv)[ Packagist](https://packagist.org/packages/m4rku5/dotenv)[ RSS](/packages/m4rku5-dotenv/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Dotenv
======

[](#dotenv)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5421133787b1ead205b14959a0801be31e99023c25bc717b4c22b6559052b4fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d34726b75352f646f74656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m4rku5/dotenv)[![Total Downloads](https://camo.githubusercontent.com/ea6ba3e3a9df6bc0ec24e3b298ddafa22d66355f332e9438b735e4fc48d135a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d34726b75352f646f74656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m4rku5/dotenv)

Installation
------------

[](#installation)

Install package via composer:

```
composer require m4rku5/dotenv
```

Usage
-----

[](#usage)

From `.env` ...

```
# DOCKER:
DOCKER_PORT=8001

# PROJECT:
#PROJECT_DOCUMENTROOT=public
#PROJECT_LOGS=logs

```

... doing ...

```
$dotenv = new Dotenv('.env');
$dotenv->set('PROJECT_DOCUMENTROOT', 'test');
$dotenv->enable('PROJECT_DOCUMENTROOT');
$dotenv->set('HELLO', 'World');
$dotenv->disable('HELLO');
$dotenv->unset('DOCKER_PORT');
$dotenv->save();
```

... will result in ...

```
# DOCKER:

# PROJECT:
PROJECT_DOCUMENTROOT=test
#PROJECT_LOGS=logs

#HELLO=World

```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% 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.

### Community

Maintainers

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

---

Top Contributors

[![M4RKU5-C0D3](https://avatars.githubusercontent.com/u/3947983?v=4)](https://github.com/M4RKU5-C0D3 "M4RKU5-C0D3 (5 commits)")[![wnmartens](https://avatars.githubusercontent.com/u/131443831?v=4)](https://github.com/wnmartens "wnmartens (1 commits)")

### Embed Badge

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

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

###  Alternatives

[v17development/flarum-blog

Adds a blog section to your forum

5187.1k6](/packages/v17development-flarum-blog)

PHPackages © 2026

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