PHPackages                             302dev/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. 302dev/dotenv

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

302dev/dotenv
=============

dotenv file parsing for PHP

0523PHP

Since Feb 17Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/f9f0dab5fc8cf6c8b8c916d4ca900dc598a30b046b897e44f79b949f5066c111/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a6f7365676f6e7a616c657a2f7068702d646f74656e762f6d61737465722e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/josegonzalez/php-dotenv)[![Coverage Status](https://camo.githubusercontent.com/cea9c8d1d1c1adb4ea147e6d7ca46393e564bfc5e70c2e0cd4441bf8e280507f/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6a6f7365676f6e7a616c657a2f646f74656e762e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/github/josegonzalez/dotenv)[![Total Downloads](https://camo.githubusercontent.com/d77aa4c84ab1e952d5950bd552b02daa3a5e8eec89e263611aa387a617f45b79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f7365676f6e7a616c657a2f646f74656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/josegonzalez/dotenv)[![Latest Stable Version](https://camo.githubusercontent.com/cc3f17365f47148d4e96090ede4f87b5e295104736806f9f7aac3aed2cca0c4f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f7365676f6e7a616c657a2f646f74656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/josegonzalez/dotenv)

PHP Dotenv
==========

[](#php-dotenv)

A `.env` file parsing and loading library for PHP.

- [What is it and why should I use it?](#what-is-it-and-why-should-i-use-it)
- [Rules to follow](#rules-to-follow)
- [General Security Information](#general-security-information)

Requirements
------------

[](#requirements)

- PHP 5.5+

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

[](#installation)

*\[Using [Composer](http://getcomposer.org/)\]*

Run `composer require josegonzalez/dotenv:`

Or add the plugin to your project's `composer.json` - something like this:

```
  {
    "require": {
      "josegonzalez/dotenv": "3.3.0"
    }
  }
```

Usage
-----

[](#usage)

Create a new loader:

```
