PHPackages                             9kinc/easyphpenvpp - 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. 9kinc/easyphpenvpp

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

9kinc/easyphpenvpp
==================

Easily read .env files using PHP and read them using $\_ENV or $\_SERVER

1.02(5y ago)114MITPHPPHP &gt;=5.3.0

Since Dec 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/9kinc/EasyPHPEnvPP)[ Packagist](https://packagist.org/packages/9kinc/easyphpenvpp)[ Docs](https://github.com/9kinc/EasyPHPEnvPP)[ RSS](/packages/9kinc-easyphpenvpp/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Easily Parse PHP .env Files!
============================

[](#easily-parse-php-env-files)

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

[](#installation)

via Composer:

```
$ composer require 9kinc/easyphpenvpp
```

or Include easyphpenvpp.php in your script

Usage
-----

[](#usage)

```
require "easyphpenvpp.php"; // include the class
//require "vendor/autoload.php"; // composer autoload

$file_dir = '.env';
$easyenv = new \EasyPHPEnvPP\EasyPHPEnvPP($file_dir);

echo "";
print_r($easyenv->print_data());
echo "";

// ## functions
// $easyenv->get_file_found(); # Use this to see if file was found
// $easyenv->get_data_list(); # Array with key and value data inside , use for loop to get these values!
// $easyenv->get_errors(); # Array containing all the errors

// test
echo " Key APP_URL: " .$_ENV["APP_URL"];
echo " Key APP_NAME: " .$_SERVER["APP_NAME"];
```

You can use $\_SERVER or $\_ENV to get your values!

Note
----

[](#note)

Check .env.example on how to setup the .env file. You can also use other file formats as long as the content is in right format

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~0 days

Total

3

Last Release

1985d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ea1a062da2a859715552f1c26eb3802d7d1f711f321230d3dc955a41902dc22?d=identicon)[9kinc](/maintainers/9kinc)

---

Top Contributors

[![9kinc](https://avatars.githubusercontent.com/u/20781967?v=4)](https://github.com/9kinc "9kinc (13 commits)")

---

Tags

envphp env

### Embed Badge

![Health badge](/badges/9kinc-easyphpenvpp/health.svg)

```
[![Health](https://phpackages.com/badges/9kinc-easyphpenvpp/health.svg)](https://phpackages.com/packages/9kinc-easyphpenvpp)
```

###  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.2k](/packages/symfony-dotenv)[helhum/dotenv-connector

Makes it possible to set environment variables for composer projects.

1594.6M33](/packages/helhum-dotenv-connector)[oscarotero/env

Simple library to consume environment variables

9411.4M152](/packages/oscarotero-env)[ffraenz/private-composer-installer

A composer install helper for private packages

2331.7M5](/packages/ffraenz-private-composer-installer)[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.0M21](/packages/m1-env)

PHPackages © 2026

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