UTILITY

env_bool()

Read an environment variable as a boolean.

Signature

bool env_bool(string $name, bool $default = false)

Example

env_bool('APP_DEBUG', false);

Available from: 1.5.0

Reference navigation

Previous: duration()

Next: env_float()

Back to utilities