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

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

imponeer/env
============

Small helper dealing with environment variables

v1.1.3(1mo ago)013.7k↓75%MITPHPPHP &gt;=8.3CI passing

Since Jun 11Pushed 1mo ago2 watchersCompare

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

READMEChangelog (10)Dependencies (10)Versions (16)Used By (0)

[![License](https://camo.githubusercontent.com/185526790c6a598d09ed0d533e47308ea3c9790eeedf0e7830f47b0207006763/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d706f6e6565722f656e762e737667)](LICENSE)[![GitHub release](https://camo.githubusercontent.com/4ebc7a0ab925b7915abdb836104377d5a69069bad7d91d3552582d6ab511037e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696d706f6e6565722f656e762e737667)](https://github.com/imponeer/env/releases) [![PHP](https://camo.githubusercontent.com/0d556ef85cb9bd5f0d1052753c70f56d7963fb0e9ce53effef01049695bbe947/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f696d706f6e6565722f656e762e737667)](http://php.net)[![Packagist](https://camo.githubusercontent.com/35cce12ba08764075606b836dcfb1e5a19f57ebc59387e9ced536e81c0cef594/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696d706f6e6565722f656e762e737667)](https://packagist.org/packages/imponeer/env)

ENV
===

[](#env)

A lightweight and efficient PHP helper library for managing environment variables with a clean and simple API.

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

[](#installation)

To install this package using [Composer](https://getcomposer.org):

```
composer require imponeer/env
```

For manual installation, clone this repository and include the files from the `src/` directory in your project.

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
// Get an environment variable with a default value
$path = env('APP_PATH', '/var/www');

// Get a boolean environment variable
$isDebug = (bool) env('APP_DEBUG', false);

// Get an integer value
$port = (int) env('APP_PORT', 8080);
```

Development
-----------

[](#development)

### Testing and Code Quality

[](#testing-and-code-quality)

This project uses several tools to ensure code quality and reliability. Here are the available commands:

**Run Unit Tests**Execute the test suite using PHPUnit:

```
composer test
```

**Check Code Style**Verify code adheres to PSR-12 standards:

```
composer phpcs
```

**Fix Code Style Issues**Automatically fix code style violations:

```
composer phpcbf
```

**Run Static Analysis**Perform static code analysis with PHPStan:

```
composer phpstan
```

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

[](#contributing)

We welcome contributions! Here's how you can help:

1. Fork the repository
2. Create a feature branch: `git checkout -b feature/your-feature-name`
3. Make your changes following PSR-12 coding standards
4. Add tests for your changes
5. Run the test suite: `composer test`
6. Check code style: `composer phpcs`
7. Fix any style issues: `composer phpcbf`
8. Run static analysis: `composer phpstan`
9. Commit your changes: `git commit -m 'Add some feature'`
10. Push to the branch: `git push origin feature/your-feature-name`
11. Open a pull request

### Reporting Issues

[](#reporting-issues)

Found a bug or have a feature request? Please open an issue on our [GitHub Issues](https://github.com/imponeer/env/issues) page.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance90

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 68.9% 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 ~115 days

Recently: every ~228 days

Total

13

Last Release

48d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.2

v1.1.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/dba53e399a507d1f60626164c8b1e340a5cc0dc4f0637f4c6aaff8fc239fdaee?d=identicon)[fiammybe](/maintainers/fiammybe)

![](https://www.gravatar.com/avatar/7255f306e0ca27292c50cdd9644c1c04e0d7b0f54bf35e0cdd79dc55c83b4923?d=identicon)[MekDrop](/maintainers/MekDrop)

![](https://www.gravatar.com/avatar/79009323fafcd4974bb1713b12eea0a610f01c4fb21cc5e85d446c4cb66453d4?d=identicon)[skenow](/maintainers/skenow)

---

Top Contributors

[![MekDrop](https://avatars.githubusercontent.com/u/342641?v=4)](https://github.com/MekDrop "MekDrop (51 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (19 commits)")[![Codex](https://avatars.githubusercontent.com/in/2248422?v=4)](https://github.com/Codex "Codex (2 commits)")[![fiammybe](https://avatars.githubusercontent.com/u/3736946?v=4)](https://github.com/fiammybe "fiammybe (1 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")

---

Tags

composer-libraryenvironmenthacktoberfest

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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