public
    static function getEnvironment()
    {
        if (empty(self::$environment)) {
            self::$environment = getenv(self::ENV)
                ?: @$_SERVER[self::ENV]
                    ?: @$_ENV[self::ENV];

            // If the environment cannot be inferred, assume production.
            if (empty(self::$environment)) {
                self::$environment = self::ENV_PRODUCTION;
            }
        }

        return self::$environment;
    }
public
    static function getEnvironment()
    {
        if (empty(self::$environment)) {
            self::$environment = getenv(self::ENV)
                ?: @$_SERVER[self::ENV]
                    ?: @$_ENV[self::ENV];

            // If the environment cannot be inferred, assume production.
            if (empty(self::$environment)) {
                self::$environment = self::ENV_PRODUCTION;
            }
        }

        return self::$environment;
    }
public static function getEnvironment ( ) { if ( empty ( self :: $ environment ) ) { self :: $ environment = getenv ( self :: ENV ) ? : @ $ _SERVER [ self :: ENV ] ? : @ $ _ENV [ self :: ENV ] ; // If the environment cannot be inferred, assume production. if ( empty ( self :: $ environment ) ) { self :: $ environment = self :: ENV_PRODUCTION ; } } return self :: $ environment ; }
Find out the current environment.

@return string the current environment.
Find out the current environment .