Download the PHP package rfussien/dotenv without Composer
On this page you can find all versions of the php package rfussien/dotenv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rfussien/dotenv
More information about rfussien/dotenv
Files in rfussien/dotenv
Package dotenv
Short Description dotenv loader/parser improved for performance
License MIT
Homepage https://github.com/rfussien/dotenv
Informations about the package dotenv
dotenv
Requirements
PHP >= 5.6 | >= 7.0 | >= 7.1
:warning:
HHVM not supported so far
:warning:
Install
Via Composer
Usage
Why should I use this dotenv loader instead of another ?
This package is meant to be faster than the other dotenv loaders.
But please, don't believe me, check my small benchmark out, and try it by yourself.
It has less features, but come on, it's about a config file and a minimum computing should be done...
IMHO:
- A real boolean MUST NOT be between quotes
- A string SHOULD be between quotes or double quotes
- An empty value is not null, but an empty string
- Computing nested values every single time my app runs is a waste of time
Results
In the .env | type | value |
---|---|---|
K01=true | bool | true |
K02=tRuE | bool | true |
K03="true" | string(4) | "true" |
K04=on | bool | true |
K05=On | bool | true |
K06="on" | string(2) | "on" |
K07=yes | bool | true |
K08=Yes | bool | true |
K09="yes" | string(3) | "yes" |
K10=false | bool | false |
K11=fAlSe | bool | false |
K12="false" | string(5) | "false" |
K13=off | bool | false |
K14=Off | bool | false |
K15="off" | string(3) | "off" |
K16=no | bool | false |
K17=No | bool | false |
K18="no" | string(2) | "no" |
K19=1 | int | 1 |
K20=1.1 | double | 1.1 |
K21=value | string(5) | "value" |
K22="value" | string(5) | "value" |
K23="VaLuE" | string(5) | "VaLuE" |
K24=VaLuE | string(5) | "VaLuE" |
K25="value \" value" | string(13) | "value " value" |
K26="value \"value\" value" | string(19) | "value "value" value" |
K27="value 'value' value" | string(19) | "value 'value' value" |
K28="" | string(0) | "" |
K29= value | string(5) | "value" |
K30='value' | string(5) | "value" |
K31='' | string(0) | "" |
K32= | string(0) | "" |
K33=null | NULL | NULL |
Testing
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Remi FUSSIEN
- All Contributors
License
The MIT License (MIT). Please see License File for more information.