Using filter_var for boolean environment variables
Someone on my team added the following setting to check whether an environment variable was true or false:$settings['x_menu_admin_enable'] = strtolower(getenv('X_MENU_ADMIN_ENABLE')) === 'true' ? getenv('X_MENU_ADMIN_ENABLE') : FALSE;
I find that using PHPs filter_var makes this code a bit easier to parse and only calls getenv
once: