PHPackages                             yiiman/dotenv - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. yiiman/dotenv

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

yiiman/dotenv
=============

Parses .env files

1.1.1(4y ago)17MITPHPPHP &gt;=7.3

Since Jan 9Pushed 4y agoCompare

[ Source](https://github.com/yiiman-dev/php-dotenv)[ Packagist](https://packagist.org/packages/yiiman/dotenv)[ RSS](/packages/yiiman-dotenv/feed)WikiDiscussions main Synced 1mo ago

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

php-dotenv
==========

[](#php-dotenv)

Loads environment variables from .env file to getenv(), $\_ENV and $\_SERVER.
=============================================================================

[](#loads-environment-variables-from-env-file-to-getenv-_env-and-_server)

[![Latest Stable Version](https://camo.githubusercontent.com/e706cb51408144ab7307654fd790618d11f78aa4330e992893687c31626989b1/68747470733a2f2f706f7365722e707567782e6f72672f646576636f6465722d78797a2f7068702d646f74656e762f76)](//packagist.org/packages/devcoder-xyz/php-dotenv) [![Total Downloads](https://camo.githubusercontent.com/b23883820d071e2f7053900a19ef81006aaa1e26ed348a063f62f1f57b4cdb83/68747470733a2f2f706f7365722e707567782e6f72672f646576636f6465722d78797a2f7068702d646f74656e762f646f776e6c6f616473)](//packagist.org/packages/devcoder-xyz/php-dotenv) [![Latest Unstable Version](https://camo.githubusercontent.com/cd48c571ea59d5d46925cd3e83b7228943de461be7406d4f7619818c4d9651c3/68747470733a2f2f706f7365722e707567782e6f72672f646576636f6465722d78797a2f7068702d646f74656e762f762f756e737461626c65)](//packagist.org/packages/devcoder-xyz/php-dotenv) [![License](https://camo.githubusercontent.com/92ec6e2e6cad94966f17b6d7ff4352724168616d625b4b5cab9e07f889385ecd/68747470733a2f2f706f7365722e707567782e6f72672f646576636f6465722d78797a2f7068702d646f74656e762f6c6963656e7365)](//packagist.org/packages/devcoder-xyz/php-dotenv)

```
APP_ENV=dev
DATABASE_DNS=mysql:host=localhost;dbname=test;
DATABASE_USER="root"
DATABASE_PASSWORD=root
MODULE_ENABLED=true

```

Load the variables
------------------

[](#load-the-variables)

```
