PHPackages                             alone-webman/env - 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. alone-webman/env

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

alone-webman/env
================

env分组

1.0.0(11mo ago)011MITPHPPHP &gt;=8.0

Since May 29Pushed 11mo agoCompare

[ Source](https://github.com/alone-webman/env)[ Packagist](https://packagist.org/packages/alone-webman/env)[ RSS](/packages/alone-webman-env/feed)WikiDiscussions main Synced 1mo ago

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

env分组
=====

[](#env分组)

### 安装仓库

[](#安装仓库)

```
composer require alone-webman/env

```

### alone.env文件

[](#aloneenv文件)

- env文件中如要使用true,false,null,要使用单/双引号

```
WEB_PORT=8787

[APP]
VERSION = 1.0.0
DEBUG = 'true'

[MYSQL.ADMIN]
DB_HOST = 127.0.0.1
DB_PORT = 3306
DB_USER = root
```

### 获取

[](#获取)

- `alone_env(string|int|null $key = null, mixed $default = null)`
- `$key=null`获取整个array

```
print_r(alone_env('WEB_PORT'))
print_r(alone_env('APP.VERSION'))
print_r(alone_env('MYSQL.ADMIN.DB_HOST'))
```

### 设置

[](#设置)

- `alone_env_set(array|string|int $key, mixed $val = "")`

```
alone_env_set('WEB_PORT',8080);
alone_env_set('MYSQL.ADMIN.DB_USER','admin');
alone_env_set([
'WEB_PORT'=>8080,
'MYSQL.ADMIN.DB_USER'=>'root',
]);
```

### 删除

[](#删除)

- `alone_env_del(array|string|int $key, bool $del_group = true)`

```
alone_env_del('WEB_PORT');
alone_env_del('MYSQL.ADMIN.DB_HOST');
alone_env_del(['WEB_PORT','MYSQL.ADMIN.DB_USER']);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance50

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

353d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c6a1452b0598af23c8cf24d868ce58f81436f9a16e487ceaa202c463c31f371?d=identicon)[zhqingphp](/maintainers/zhqingphp)

### Embed Badge

![Health badge](/badges/alone-webman-env/health.svg)

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

###  Alternatives

[spatie/laravel-package-tools

Tools for creating Laravel packages

935125.5M7.0k](/packages/spatie-laravel-package-tools)[wikimedia/aho-corasick

An implementation of the Aho-Corasick string matching algorithm.

573.5M3](/packages/wikimedia-aho-corasick)[tapp/laravel-aws-secrets-manager

Use AWS Secrets manager to load environment variables for configuration.

37208.6k](/packages/tapp-laravel-aws-secrets-manager)[designthebox/barcode-field

225.8k](/packages/designthebox-barcode-field)

PHPackages © 2026

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