Created
January 29, 2020 01:08
-
-
Save mihow/b17628430e4c4e1a3bd9089974b75a78 to your computer and use it in GitHub Desktop.
Cast env var to boolean with default value in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://craftcms.stackexchange.com/questions/13584/devmode-phpdotenv-variable-ignored | |
'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