PHPackages                             ytake/hackdotenv - 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. ytake/hackdotenv

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

ytake/hackdotenv
================

Loads environment variables from .env to getenv()

0.9.1(5y ago)12171MITHack

Since Oct 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ytake/hackdotenv)[ Packagist](https://packagist.org/packages/ytake/hackdotenv)[ RSS](/packages/ytake-hackdotenv/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (7)Versions (14)Used By (1)

Hack Dotenv
===========

[](#hack-dotenv)

Loads environment variables from .env to getenv().

[![Build Status](https://camo.githubusercontent.com/0f850c6bf82de4813c7fbd113640162f35a4be0b77bd7217657f2e36e87e8104/68747470733a2f2f7472617669732d63692e6f72672f7974616b652f6861636b646f74656e762e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ytake/hackdotenv)

[vlucas/phpdotenv](https://github.com/vlucas/phpdotenv) converted for Hack

**require HHVM &gt;=4.20**

Install
-------

[](#install)

```
$ hhvm $(which composer) require ytake/hackdotenv

```

Usage
-----

[](#usage)

Your application configuration to a .env file in the root of your project.

```
FOO=bar
BAR=baz

```

You can then load .env in your application.

```
use type Ytake\Dotenv\Loader;

$dotenv = new Dotenv($this->dir);
await $dotenv->loadAsync();
```

```
use namespace Ytake\Dotenv;

Dot\env('FOO');
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

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

Every ~58 days

Recently: every ~35 days

Total

12

Last Release

2142d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47817f3dd2890864096bd77ee772ec46061432f128988ca23939b0ca486d7bc3?d=identicon)[ytake](/maintainers/ytake)

---

Top Contributors

[![ytake](https://avatars.githubusercontent.com/u/4454078?v=4)](https://github.com/ytake "ytake (39 commits)")

---

Tags

dotenvhacklanghhvmhhvmenvdotenvhack

### Embed Badge

![Health badge](/badges/ytake-hackdotenv/health.svg)

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

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k226.7M2.3k](/packages/symfony-dotenv)

PHPackages © 2026

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