PHPackages                             zrcing/phpenv - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. zrcing/phpenv

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

zrcing/phpenv
=============

Easy to load system enivronment configuration from $\_ENV,$\_SERVER,getenv.

v1.0.0(9y ago)111655MITPHPPHP &gt;=5.3

Since Sep 13Pushed 9y ago2 watchersCompare

[ Source](https://github.com/zrcing/phpenv)[ Packagist](https://packagist.org/packages/zrcing/phpenv)[ Docs](https://github.com/zrcing/phpenv)[ RSS](/packages/zrcing-phpenv/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP Env
=======

[](#php-env)

Easy to load system enivronment configuration from $\_ENV,$\_SERVER,getenv. ##Installation Insstall the lastest version with

```
$ composer require zrcing/phpenv

```

or

```
{
	"name" : "project name",
	"repositories" : [ {
		"type" : "composer",
		"url" : "https://packagist.org/"
	}],
	"require": {
		"zrcing/phpenv": "~1.0"
	}
}

```

\##Demo ###Step 1: Created .env file

```
#Master database
DB_HOST = '127.0.0.1' #Local database
DB_NAME="db_name"
DB_USER="root"
DB_PWD="root"
DB_PORT=3306

#Slave database 1
DB_SLAVE1_HOST="127.0.0.1"
DB_SLAVE1_NAME="db_name"
DB_SLAVE1_USER="root"
DB_SLAVE1_PWD="root"
DB_SLAVE1_PORT=3306

```

\###Step 2: Usage use Phpenv\\Env;

```
$envFile = realpath(".env");
Env::load($envFile);

print_r($_ENV);
print_r($_SERVER);

```

License
-------

[](#license)

Released under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

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

3535d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3fba3f14cc1f35bfc9d5504bd212343256b393982415a4581ab16fb8efb0cf1e?d=identicon)[liaogling](/maintainers/liaogling)

---

Top Contributors

[![zrcing](https://avatars.githubusercontent.com/u/1124192?v=4)](https://github.com/zrcing "zrcing (25 commits)")

---

Tags

serverenvphpenvgetenv

### Embed Badge

![Health badge](/badges/zrcing-phpenv/health.svg)

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

###  Alternatives

[spatie/laravel-webhook-server

Send webhooks in Laravel apps

1.1k8.8M22](/packages/spatie-laravel-webhook-server)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[clue/socket-raw

Simple and lightweight OOP wrapper for PHP's low-level sockets extension (ext-sockets).

35111.1M48](/packages/clue-socket-raw)[voryx/thruway

Thruway WAMP router core

6771.0M17](/packages/voryx-thruway)[php-mcp/server

PHP SDK for building Model Context Protocol (MCP) servers - Create MCP tools, resources, and prompts

828280.5k25](/packages/php-mcp-server)

PHPackages © 2026

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