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

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

vatradar/env
============

An environment variable convenience library extension for vlucas/phpdotenv

0.6.0(3y ago)04.1k↑66.7%LGPL-3.0PHPPHP &gt;=8.1

Since Mar 7Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

Env Convenience Helper
======================

[](#env-convenience-helper)

This package is fairly simple - it's meant to standardize access to environment variables without having to resort to accessing `$_ENV['SOME_VAR']` directly. Yes, this is more of a preference thing rather than actually addressing a technical deficiency. And that's okay.

It encapsulates [vlucas/phpdotenv](https://github.com/vlucas/phpdotenv) package and provides access to that package's instance for custom configuration as well as a convenience method to access environment variables. It is also opinionated, so it initializes as immutable by default. It is also not meant for super-complex configurations with multiple .env files. For that, just use [dotenv](https://github.com/vlucas/phpdotenv) directly.

Quick install
-------------

[](#quick-install)

```
composer require vatradar/env
```

Env attempts to follow [semantic versioning](https://semver.org) principles but is also part of a larger private monorepo and shared codebase – due to this, version bumps of this package may happen even if no package-specific changes occur.

Quick Start
-----------

[](#quick-start)

```
