{"id":22851032,"url":"https://github.com/neonxp/dotenv","last_synced_at":"2025-10-06T12:59:27.799Z","repository":{"id":57025027,"uuid":"118043620","full_name":"neonxp/Dotenv","owner":"neonxp","description":"Advanced loading and parsing .env file in PHP-7","archived":false,"fork":false,"pushed_at":"2018-01-19T16:03:33.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T10:53:34.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neonxp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-18T22:02:05.000Z","updated_at":"2018-01-18T22:02:30.000Z","dependencies_parsed_at":"2022-08-23T15:00:20.669Z","dependency_job_id":null,"html_url":"https://github.com/neonxp/Dotenv","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neonxp%2FDotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neonxp%2FDotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neonxp%2FDotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neonxp%2FDotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neonxp","download_url":"https://codeload.github.com/neonxp/Dotenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246429457,"owners_count":20775805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T05:11:12.952Z","updated_at":"2025-10-06T12:59:22.777Z","avatar_url":"https://github.com/neonxp.png","language":"PHP","readme":"# Dotenv\n\n[![Build Status](https://travis-ci.org/NeonXP/Dotenv.svg?branch=master)](https://travis-ci.org/NeonXP/Dotenv)\n[![Codecov](https://img.shields.io/codecov/c/github/neonxp/dotenv.svg)](https://codecov.io/gh/NeonXP/Dotenv)\n[![GitHub issues](https://img.shields.io/github/issues/neonxp/dotenv.svg)](https://github.com/neonxp/dotenv/issues)\n[![GitHub forks](https://img.shields.io/github/forks/neonxp/dotenv.svg)](https://github.com/neonxp/dotenv/network)\n[![GitHub stars](https://img.shields.io/github/stars/neonxp/dotenv.svg)](https://github.com/neonxp/dotenv/stargazers)\n[![GitHub license](https://img.shields.io/github/license/neonxp/dotenv.svg)](https://github.com/neonxp/dotenv)\n\n## What is it?\n\nSmall library, that automaticaly loads `.env` (or any other) file to applications environment.\n\n## Why not XXX?\n\nBecause this library is pretty simple, without external dependencies and highly customizable.\n\n## Installation\n\n```\ncomposer require neonxp/dotenv\n``` \n\n## Usage\n\nBasic usage:\n\n```php\nuse NeonXP\\Dotenv\\Dotenv;\n\n$dotenv = new Dotenv();\n$dotenv-\u003eload(); // You can specify file to load at first argument\n\nprint $dotenv-\u003eget('KEY', 'default') . PHP_EOL;\nprint $dotenv['KEY'] . PHP_EOL;\nforeach ($dotenv as $key =\u003e $value) {\n    print \"$key = $value\" . PHP_EOL;\n}\n```\n\n## .env file syntax\n\nHere examples of syntax:\n\n```\n# This is a comment\n\n# Empty lines also ignored\nexport KEY1=VALUE1\nKEY2 = VALUE2 # Inline comment\nKEY3 = 'VALUE3 # This is not comment'\nKEY4 = \"VALUE4 # And this value too\"\nKEY5 = ${KEY1} -\u003e ${KEY2} # Compilled from another variables\n```\n\nand we will get:\n\n```php\n[\n    'KEY1' =\u003e 'VALUE1',\n    'KEY2' =\u003e 'VALUE2',\n    'KEY3' =\u003e 'VALUE3 # This is not comment',\n    'KEY4' =\u003e 'VALUE4 # And this value too',\n    'KEY5' =\u003e 'VALUE1 -\u003e VALUE2',\n]\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneonxp%2Fdotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneonxp%2Fdotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneonxp%2Fdotenv/lists"}