# ralouphie/getallheaders

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ralouphie-getallheaders).**

3,795 stars · 35 forks · PHP · MIT

## Links

- GitHub: https://github.com/ralouphie/getallheaders
- awesome-repositories: https://awesome-repositories.com/repository/ralouphie-getallheaders.md

## Description

This project is a PHP environment compatibility library and polyfill designed to provide a consistent interface for retrieving all incoming HTTP request headers. It functions as a request header parser that extracts and normalizes raw server variables into a predictable associative array.

The library ensures cross-platform behavior by detecting missing native functions at runtime and injecting fallback implementations. This allows for standardized request header retrieval and server variable normalization across diverse server architectures and configurations.

## Tags

### Programming Languages & Runtimes

- [PHP Polyfills](https://awesome-repositories.com/f/programming-languages-runtimes/php-polyfills.md) — Provides pure PHP polyfills for native functionality to ensure reliability across various server configurations.
- [Compatibility Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/compatibility-libraries.md) — Provides runtime fallback implementations of native functions to ensure consistent behavior across PHP environments.

### Development Tools & Productivity

- [Server Variable Mappings](https://awesome-repositories.com/f/development-tools-productivity/environment-variable-mapping/json-based-startup-mapping/server-configuration-mappings/server-variable-mappings.md) — Extracts and normalizes HTTP request headers from server-side superglobal variables into a predictable format.
- [General Compatibility Layers](https://awesome-repositories.com/f/development-tools-productivity/php-5-x-compatibility-polyfills/general-compatibility-layers.md) — Implements a compatibility layer that provides drop-in replacements for missing native PHP functions.
- [Header Extractors](https://awesome-repositories.com/f/development-tools-productivity/request-header-management/header-extractors.md) — Extracts all incoming HTTP request headers as a list of key-value pairs regardless of the server environment. ([source](https://github.com/ralouphie/getallheaders#readme))

### Networking & Communication

- [HTTP Header Polyfills](https://awesome-repositories.com/f/networking-communication/http-header-manipulators/http-header-polyfills.md) — Provides a consistent polyfilled interface for retrieving all incoming HTTP request headers.
- [Header Normalization](https://awesome-repositories.com/f/networking-communication/proxy-headers/header-normalization.md) — Normalizes the casing and structure of incoming HTTP request headers for consistent application behavior.
- [Request Header Configuration](https://awesome-repositories.com/f/networking-communication/request-header-configuration.md) — Offers a standardized interface for accessing incoming HTTP request headers without manual environment parsing. ([source](https://github.com/ralouphie/getallheaders#readme))
- [Case-Insensitive Header Normalizers](https://awesome-repositories.com/f/networking-communication/proxy-headers/header-normalization/case-insensitive-header-normalizers.md) — Provides case-insensitive access to HTTP headers while ensuring a standardized format for reliable data retrieval.

### Software Engineering & Architecture

- [Runtime Environment Detection](https://awesome-repositories.com/f/software-engineering-architecture/hierarchical-detection-logic/runtime-environment-detection.md) — Detects available native functions at runtime to determine if fallback polyfill implementations are required.
- [Global](https://awesome-repositories.com/f/software-engineering-architecture/namespace-management/namespace-injections/global.md) — Dynamically injects functions into the global scope to ensure a consistent interface across different server configurations.

### Web Development

- [Header Parsers](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-utilities/http-header-manipulators/header-parsers.md) — Analyzes and extracts request headers from raw server variables into a predictable associative array.
- [PHP Superglobal Request Abstractions](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-request-handling/php-superglobal-request-abstractions.md) — Parses and abstracts PHP superglobal arrays to reconstruct missing HTTP header information.

### DevOps & Infrastructure

- [Cross-Platform Server Deployments](https://awesome-repositories.com/f/devops-infrastructure/deployment-management-strategies/execution-platforms-and-targets/deployment-infrastructure/virtual-private-server-deployment-guides/cross-platform-server-deployments.md) — Ensures consistent metadata retrieval across diverse server architectures and operating system environments.
