PHPackages                             r3n0e0/env-php - 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. r3n0e0/env-php

ActiveLibrary

r3n0e0/env-php
==============

A utility that provides several functions for accessing environment variables.

0.1.0(8y ago)013MITPHPPHP &gt;=5.6

Since Jul 21Pushed 8y agoCompare

[ Source](https://github.com/r3n0e0/env-php)[ Packagist](https://packagist.org/packages/r3n0e0/env-php)[ RSS](/packages/r3n0e0-env-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

env-php
=======

[](#env-php)

[![Build Status](https://camo.githubusercontent.com/c748d8476f2ad34e39e533353eb3401ecd124659eb38767ef83a69738d467768/68747470733a2f2f7472617669732d63692e6f72672f72336e3065302f656e762d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/r3n0e0/env-php)

This is a utility that provides several functions for accessing environment variables.

Inspired by the [env](https://github.com/kennethreitz/env) library for Python.

Example Usage
-------------

[](#example-usage)

Environment variables:

```
GITHUB_USER=xxx
GITHUB_TOKEN=yyy
API_TOKEN=zzz

```

Easy to use as follows:

```
>>> require __DIR__ . '/vendor/autoload.php';
>>> use EnvPHP\Env;
>>> $env = Env::prefix('GITHUB_');
>>> var_dump($env);
array(2) {
  'user' =>
  string(3) "xxx"
  'token' =>
  string(3) "yyy"
}
>>> $env = Env::suffix('_TOKEN');
>>> var_dump($env);
array(2) {
  'github' =>
  string(3) "yyy"
  'api' =>
  string(3) "zzz"
}

```

Thanks
------

[](#thanks)

- Kenneth Reitz ([kennethreitz](https://github.com/kennethreitz))

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

3220d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/19e6f080ce0f1bee5dcb71e56487addbc1be15579342111113d9217706797d73?d=identicon)[r3n0e0](/maintainers/r3n0e0)

---

Top Contributors

[![r3n0e0](https://avatars.githubusercontent.com/u/30016750?v=4)](https://github.com/r3n0e0 "r3n0e0 (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/r3n0e0-env-php/health.svg)

```
[![Health](https://phpackages.com/badges/r3n0e0-env-php/health.svg)](https://phpackages.com/packages/r3n0e0-env-php)
```

PHPackages © 2026

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