{"id":33985421,"url":"https://github.com/sergeyakovlev/env-php","last_synced_at":"2026-05-26T21:33:12.852Z","repository":{"id":62542410,"uuid":"459893708","full_name":"sergeyakovlev/env-php","owner":"sergeyakovlev","description":"A simple library to loads environment variables from “.env” file","archived":false,"fork":false,"pushed_at":"2025-02-28T12:40:16.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-14T17:05:45.648Z","etag":null,"topics":["config","dotenv","env","environment","php"],"latest_commit_sha":null,"homepage":"","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/sergeyakovlev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-16T07:16:59.000Z","updated_at":"2023-04-06T12:29:56.000Z","dependencies_parsed_at":"2022-11-02T16:16:10.074Z","dependency_job_id":null,"html_url":"https://github.com/sergeyakovlev/env-php","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sergeyakovlev/env-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyakovlev%2Fenv-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyakovlev%2Fenv-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyakovlev%2Fenv-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyakovlev%2Fenv-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergeyakovlev","download_url":"https://codeload.github.com/sergeyakovlev/env-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyakovlev%2Fenv-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33540614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["config","dotenv","env","environment","php"],"created_at":"2025-12-13T04:55:37.474Z","updated_at":"2026-05-26T21:33:12.826Z","avatar_url":"https://github.com/sergeyakovlev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Env\n\nA simple library to loads environment variables from “.env” file.\n\n## Installation\n\nInstall via [Composer](https://getcomposer.org/):\n\n```bash\n$ composer require sergeyakovlev/env\n```\n\n## Usage\n\n### Initialization\n\n```php\nuse SergeYakovlev\\Env\\Env;\n\n// If necessary non-default initialization\nEnv::init('/path/to/project', ['.env.dist', '.env']); // This is the default behavior\n```\n\n### Use cases\n\n```php\n// The first use case\n$dbHostname = Env::var('DB_HOSTNAME');\n\n// The second use case is with the default value\n$dbHostname = Env::var('DB_HOSTNAME', 'localhost');\n\n// Check if an environment variable is existed\n$dbHostnameIsExists = Env::exists('DB_HOSTNAME');\n```\n\n### Example of “.env” file\n\n```ini\n# Comment Line\n\nSTRING_VAR1=StringValueWithoutSpaces\nSTRING_VAR2=\"String value with spaces\"\n\nBOOLEAN_VAR1=true\nBOOLEAN_VAR2=false\n\nBOOLEAN_VAR3=on\nBOOLEAN_VAR4=off\n\nINT_VAR=123\n\nFLOAT_VAR=123.45\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeyakovlev%2Fenv-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergeyakovlev%2Fenv-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeyakovlev%2Fenv-php/lists"}