Skip to content

Instantly share code, notes, and snippets.

Created Jan 29, 2020
What would you like to do?
Cast env var to boolean with default value in PHP
'devMode' => filter_var(getenv('DEV_MODE') ?: false, FILTER_VALIDATE_BOOLEAN),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment