Env
Env copied to clipboard
Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.
Fixes m1/Env#17
```sh $ cat /tmp/test.env TEST="namespace\\class" $ source /tmp/test.env && echo $TEST namespace\class $ php -r 'require_once "vendor/autoload.php"; echo M1\Env\Parser::parse(file_get_contents("/tmp/test.env"))["TEST"].PHP_EOL;' namespace\\class ``` expected: `namespace\class`
This would be super useful for things like auto-generated configuration files written in .env (which is what I'm currently attempting to use)
We should have a strict parsing mode for .env files, specifically around general variable assignment.