{"id":17134344,"url":"https://github.com/brianium/habitat","last_synced_at":"2025-07-25T07:38:15.129Z","repository":{"id":8848365,"uuid":"10555477","full_name":"brianium/habitat","owner":"brianium","description":"Dependable environment variables for PHP","archived":false,"fork":false,"pushed_at":"2020-10-31T21:31:08.000Z","size":21,"stargazers_count":44,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-15T05:14:01.359Z","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/brianium.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":"2013-06-07T17:42:02.000Z","updated_at":"2022-07-21T17:12:25.000Z","dependencies_parsed_at":"2022-09-20T07:02:26.126Z","dependency_job_id":null,"html_url":"https://github.com/brianium/habitat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/brianium/habitat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fhabitat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fhabitat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fhabitat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fhabitat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianium","download_url":"https://codeload.github.com/brianium/habitat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fhabitat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266974451,"owners_count":24014912,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-14T19:44:40.151Z","updated_at":"2025-07-25T07:38:14.932Z","avatar_url":"https://github.com/brianium.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Habitat [![Build Status](https://travis-ci.org/brianium/habitat.png?branch=master)](https://travis-ci.org/brianium/habitat)\n\u003e Because we dont always know if $_ENV is available\n\nHabitat is a light weight wrapper over PHP's environment variable\nfunctionality. Habitat allows the retrieval of all environment variables\nwhen the ini setting `variables_order` does not contain the `E` flag\n\nExamples\n--------\n\nHabitat delegates most functionality to the native php functions `getenv` and `putenv`.\nIf $_ENV is not available due to the `variables_order` ini setting, then Habitat's `getAll`\nmethod will still allow access to all variables that are in `$_ENV`.\n\n```php\nuse Habitat\\Habit;\n\n//equivalent of getenv('FOO')\n$foo = Habitat::getenv('FOO');\n\n//equivalent of putenv('FOO=BAR')\n$wasSet = Habitat::putenv('FOO=BAR');\n\n/**\n * Returns $_ENV if set, otherwise set $_ENV via phpinfo() and\n * return it\n */\n$all = Habitat::getAll();\n```\n\nParsers\n-------\nHabitat can support the cli and html varieties of `phpinfo`. It will detect the current sapi\nand use the appropriate method to populate $_ENV\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Fhabitat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianium%2Fhabitat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Fhabitat/lists"}