PHPackages                             arrilot/dotenv-php - 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. arrilot/dotenv-php

ActiveLibrary

arrilot/dotenv-php
==================

2.0.0(8y ago)3734.8k↓30.2%93MITPHPPHP &gt;=5.4.0

Since Feb 22Pushed 8y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (3)

[![Latest Stable Version](https://camo.githubusercontent.com/f64243d41a3fde8b638bd8c830bf52bb320aac16e4dc527ac211af721a08b7b1/68747470733a2f2f706f7365722e707567782e6f72672f617272696c6f742f646f74656e762d7068702f762f737461626c652e737667)](https://packagist.org/packages/arrilot/dotenv-php/)[![Total Downloads](https://camo.githubusercontent.com/0368932d738b2c3e2fec9ee50637817f33055df9302529e0ae9727cf8479e227/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617272696c6f742f646f74656e762d7068702e7376673f7374796c653d666c6174)](https://packagist.org/packages/Arrilot/dotenv-php)[![Build Status](https://camo.githubusercontent.com/a6e9d1e1dd75fdf55f74d1dd8e01f525f95081801c8624f642fe96e8920295df/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f617272696c6f742f646f74656e762d7068702f6d61737465722e7376673f7374796c653d666c6174)](https://travis-ci.org/arrilot/dotenv-php)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/691c09114b3fa3dce8155789efbf0673ea2092868c4902f14e21a81a2a5e2948/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617272696c6f742f646f74656e762d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/arrilot/dotenv-php/)

Simple dotenv for PHP
=====================

[](#simple-dotenv-for-php)

Introduction
------------

[](#introduction)

Q: What's the point of this package? How is it any different from those [vlucas/phpdotenv](https://github.com/vlucas/phpdotenv/) and [josegonzalez/php-dotenv](https://github.com/josegonzalez/php-dotenv) well-known packages?

A: Those great packages are NOT for production. They were always meant to be used during local development only. The main reasons are:

1. Not fast enough
2. Not secure enough

Many people are actually misuse those packages and use them to configure apps in production too.

In contrast this package IS for production. It uses plain old php array for `.env` content and doesn't touch $\_ENV or $\_SERVER by default. As a result it's fast and secure but has less features.

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

[](#installation)

1. `composer require arrilot/dotenv-php`
2. Create `.env.php` file to store configuration settings that are environment specific or sensitive.

Example:

```
