Developer tools

phpdotenv/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.

Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.

Repository details

  • Primary language: PHP
  • License identifier: BSD-3-Clause
  • Stars at capture: 13,555
  • Forks at capture: 668
  • Metadata source: GitHub API, retrieved 20 November 2026

Getting started

Read the installation section and the examples for the release you intend to use. Check its PHP and extension requirements against your development environment.

Discussion

Sign in to participate.