Download the PHP package deinternetjongens/env without Composer
On this page you can find all versions of the php package deinternetjongens/env. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download deinternetjongens/env
More information about deinternetjongens/env
Files in deinternetjongens/env
Download deinternetjongens/env
More information about deinternetjongens/env
Files in deinternetjongens/env
Vendor deinternetjongens
Package env
Short Description Simple library to consume environment variables
License MIT
Package env
Short Description Simple library to consume environment variables
License MIT
Keywords env
Please rate this library. Is it a good library?
Informations about the package env
env
Simple library to get environment variables converted to simple types.
Installation
This package is installable and autoloadable via Composer as oscarotero/env.
Example
Available conversions:
- "false" is converted to boolean
false
- "true" is converted to boolean
true
- "null" is converted to
null
- If the string contains only numbers is converted to an integer
- If the string has quotes, remove them
To configure the conversion, you can use the following constants (all enabled by default):
Env::CONVERT_BOOL
To convert boolean valuesEnv::CONVERT_NULL
To convert null valuesEnv::CONVERT_INT
To convert integer valuesEnv::STRIP_QUOTES
To remove the quotes of the strings
Default value
By default, if the value does not exits, returns null
, but you can change for any other value:
The env() function
If you don't want to complicate with classes and namespaces, you can use the env()
function, like in Laravel or other libraries:
All versions of env with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.2
The package deinternetjongens/env contains the following files
Loading the files please wait ....