claas / phpdotenvcache
A simple cached loader for Phpdotenv
Installs: 46
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/claas/phpdotenvcache
Requires
- vlucas/phpdotenv: ^2.4
This package is not auto-updated.
Last update: 2025-10-12 07:44:17 UTC
README
A simple cached loader for PHP dotenv.
Usage
First, install Composer.
curl -sS https://getcomposer.org/installer | php
Next, add phpdotenvcache:
php composer.phar require claas/phpdotenvcache
Then, include Composer's autoloader:
require 'vendor/autoload.php';
Finally, you can use the PHP dotenv cache:
$dotenv = new Dotenv\CachedDotenv(); $dotenv->load(__DIR__); // Alternatively, only load to $_ENV or $_SERVER globals: // $dotenv->loadToEnv(__DIR__); // $dotenv->loadToServer(__DIR__);