Last active
June 14, 2018 16:38
-
-
Save jacobgraf/057e120252170c1b7e553e9d60827873 to your computer and use it in GitHub Desktop.
.env Boolean Variable Function
This file contains hidden or 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
<?php | |
// Custom Dotenv Boolean Support | |
if (! function_exists('evalBool')) { | |
function evalBool($value) | |
{ | |
return (strcasecmp($value, 'true') ? false : true); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment