public static function GetEnvironment() { if (!self::$_environment) { $serverAddress = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR']; $remoteAddress = $_SERVER['REMOTE_ADDR']; if ($serverAddress == $remoteAddress) { self::$_environment = 'development'; } else { self::$_environment = 'production'; } } return self::$_environment; }