# docker-library/php

**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/docker-library-php).**

4,026 stars · 2,014 forks · Dockerfile · MIT

## Links

- GitHub: https://github.com/docker-library/php
- Homepage: https://php.net
- awesome-repositories: https://awesome-repositories.com/repository/docker-library-php.md

## Description

This project provides a server-side language runtime and a standardized Docker image for deploying applications across different operating systems. It functions as an execution environment for generating dynamic HTML, JSON, and XML content, while also serving as a command line interface for automation scripts and background jobs.

The runtime is designed for extensibility through a C-based extension architecture, allowing the loading of custom modules for specialized functionality. It supports multiple server application interfaces, including a FastCGI web interface for high-performance communication with web servers and a built-in web server for hosting pages without external installations.

The capability surface covers a wide range of systems programming and web development tasks. These include database integration for SQL and non-relational engines, network protocol communication via HTTP and SOAP, and security primitives for password hashing and symmetric encryption. Additionally, the runtime provides tools for XML processing, multibyte string handling, and arbitrary precision mathematics.

The project is packaged as a layered container image to ensure consistent execution across various hosting environments.

## Tags

### DevOps & Infrastructure

- [Containerized Application Deployments](https://awesome-repositories.com/f/devops-infrastructure/containerized-application-deployments.md) — Provides standardized Docker images to run applications across different operating systems. ([source](https://php.net/downloads.php))
- [Container Image Packaging](https://awesome-repositories.com/f/devops-infrastructure/container-image-packaging.md) — Provides standardized container images that bundle the runtime and dependencies for consistent cross-platform deployment.
- [Docker Image Packaging](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/container-runtimes/runtime-configuration-interfaces/docker-socket-orchestrators/docker-target-configurators/docker-container-deployments/docker-image-packaging.md) — Ships standardized Docker images that bundle the runtime and dependencies for portable deployment.
- [Web Server Integrations](https://awesome-repositories.com/f/devops-infrastructure/web-server-integrations.md) — Supports configuration and integration with web servers like Apache and LiteSpeed to handle HTTP requests.

### Web Development

- [Server-Side](https://awesome-repositories.com/f/web-development/server-side.md) — Functions as a server-side runtime for generating dynamic HTML, JSON, and XML content for web applications.
- [FastCGI Gateways](https://awesome-repositories.com/f/web-development/fastcgi-gateways.md) — Integrates with a FastCGI process to handle web requests more efficiently than standard CGI. ([source](https://php.net/manual/phpfi2.php))
- [Server-Side Runtimes](https://awesome-repositories.com/f/web-development/server-side-frameworks/server-side-runtimes.md) — Provides a server-side execution environment designed for generating dynamic web content.
- [Web Server Interfaces](https://awesome-repositories.com/f/web-development/web-server-interfaces.md) — Implements a Multi-SAPI interface model to integrate the runtime with various web servers and CLI environments.
- [Built-in Web Servers](https://awesome-repositories.com/f/web-development/built-in-web-servers.md) — Runs a built-in web server to serve pages without requiring external server installations. ([source](https://php.net/manual/en/features.php))
- [File Upload Handling](https://awesome-repositories.com/f/web-development/file-upload-handling.md) — Processes files uploaded via HTML forms and manages their storage in temporary directories. ([source](https://php.net/manual/en/features.php))
- [HTTP Data Transfers](https://awesome-repositories.com/f/web-development/http-data-transfers.md) — Sends and receives data from remote servers using the cURL library across a wide range of protocols. ([source](https://php.net/manual/en/refs.remote.other.php))

### Part of an Awesome List

- [JSON Parsing](https://awesome-repositories.com/f/awesome-lists/data/json-parsing.md) — Encodes and decodes data between native values and JSON format. ([source](https://php.net/manual/en/refs.basic.other.php))
- [XML Parsing](https://awesome-repositories.com/f/awesome-lists/data/xml-parsing.md) — Implements DOM and SimpleXML models for parsing and manipulating XML documents. ([source](https://php.net/manual/en/refs.xml.php))

### Data & Databases

- [Database Integration](https://awesome-repositories.com/f/data-databases/database-integration.md) — Implements connectivity primitives for interacting with both SQL and non-relational database engines.
- [Relational Database Abstractions](https://awesome-repositories.com/f/data-databases/relational-database-abstractions.md) — Provides abstraction layers and vendor drivers for interfacing with relational and non-relational databases. ([source](https://php.net/manual/en/refs.database.php))
- [SQL Database Integrations](https://awesome-repositories.com/f/data-databases/sql-database-integrations.md) — Interacts with database engines like MySQL and PostgreSQL to execute queries and retrieve data. ([source](https://php.net/manual/phpfi2.php))
- [Stream Contexts](https://awesome-repositories.com/f/data-databases/data-stream-filters/stream-contexts.md) — Controls how data is read and written through wrappers, filters, and contexts. ([source](https://php.net/manual/en/refs.basic.other.php))
- [Date and Time Libraries](https://awesome-repositories.com/f/data-databases/date-and-time-libraries.md) — Calculates dates and formats timestamps using specialized classes to standardize temporal data. ([source](https://php.net/manual/en/refs.calendar.php))
- [In-Memory Caches](https://awesome-repositories.com/f/data-databases/in-memory-caches.md) — Stores frequently accessed data in memory to reduce database load and improve response times. ([source](https://php.net/manual/en/refs.remote.other.php))

### Development Tools & Productivity

- [Server-Side Dynamic Page Generation](https://awesome-repositories.com/f/development-tools-productivity/page-skeleton-generators/dynamic-page-generators/server-side-dynamic-page-generation.md) — Processes server-side scripts to render dynamic HTML, JSON, or XML content for web browsers. ([source](https://php.net/manual/en/introduction.php))
- [Remote File Reading](https://awesome-repositories.com/f/development-tools-productivity/remote-file-transfers/remote-file-reading.md) — Reads data from HTTP and FTP URLs using standard file functions to parse content or include scripts. ([source](https://php.net/manual/en/features.remote-files.php))

### Networking & Communication

- [HTTP Cookie Management](https://awesome-repositories.com/f/networking-communication/http-clients/http-cookie-management.md) — Provides structured access to HTTP cookie names, values, and security attributes for tracking users. ([source](https://php.net/manual/en/features.cookies.php))
- [Network Protocol Implementations](https://awesome-repositories.com/f/networking-communication/network-protocol-implementations.md) — Interacts with external services using standard protocols including HTTP, LDAP, and IMAP or raw sockets. ([source](https://php.net/manual/en/introduction.php))
- [Asynchronous Networking](https://awesome-repositories.com/f/networking-communication/asynchronous-networking.md) — Implements non-blocking I/O operations and coroutines to build high-performance concurrent servers. ([source](https://php.net/manual/en/refs.basic.other.php))
- [IMAP, POP3, and SMTP Implementations](https://awesome-repositories.com/f/networking-communication/mail-servers/imap-pop3-and-smtp-implementations.md) — Transmits messages via SMTP and parses incoming mail streams using IMAP, POP3, and NNTP protocols. ([source](https://php.net/manual/en/refs.remote.mail.php))
- [Filesystem Protocol Remote Access](https://awesome-repositories.com/f/networking-communication/remote-access-clients/interactive-remote-access/filesystem-protocol-remote-access.md) — Uses URL-style wrappers to interact with different network protocols through standard filesystem functions. ([source](https://php.net/manual/en/wrappers.php))
- [Socket Networking](https://awesome-repositories.com/f/networking-communication/socket-networking.md) — Creates and manages low-level network connections to implement custom communication protocols. ([source](https://php.net/manual/en/refs.remote.other.php))

### Programming Languages & Runtimes

- [Bytecode Virtual Machines](https://awesome-repositories.com/f/programming-languages-runtimes/bytecode-virtual-machines.md) — Compiles source code into internal bytecode executed by the Zend-Engine virtual machine.
- [C-Based Extension Architectures](https://awesome-repositories.com/f/programming-languages-runtimes/c-based-extension-architectures.md) — Provides a C-based extension architecture for loading custom modules to extend core runtime functionality.
- [CLI Script Execution](https://awesome-repositories.com/f/programming-languages-runtimes/cli-script-execution.md) — Enables the execution of scripts directly from the terminal for automation and background tasks. ([source](https://php.net/manual/en/introduction.php))
- [Internal Function Extensions](https://awesome-repositories.com/f/programming-languages-runtimes/internal-function-extensions.md) — Allows adding custom functions to the runtime core by modifying the grammar and implementing logic in C. ([source](https://php.net/manual/phpfi2.php))
- [Concurrent Thread Execution](https://awesome-repositories.com/f/programming-languages-runtimes/concurrent-thread-execution.md) — Executes multiple operations concurrently using separate threads to increase processing speed for heavy workloads. ([source](https://php.net/manual/en/refs.fileprocess.process.php))
- [Random Number Generation](https://awesome-repositories.com/f/programming-languages-runtimes/random-number-generation.md) — Produces pseudo-random and cryptographically secure numbers using various engines. ([source](https://php.net/manual/en/refs.basic.other.php))

### Security & Cryptography

- [Stateful Session Persistence](https://awesome-repositories.com/f/security-cryptography/identity-access-management/session-management/stateful-session-persistence.md) — Maintains browser context and authentication state across multi-step web interactions via persistence layers. ([source](https://php.net/manual/en/features.sessions.php))
- [Cookie-Based Session Management](https://awesome-repositories.com/f/security-cryptography/session-cookie-handlers/cookie-based-session-management.md) — Manages browser sessions by storing and matching cookies with domain and path specificity. ([source](https://php.net/manual/en/features.php))
- [Cryptographic Digests](https://awesome-repositories.com/f/security-cryptography/cryptographic-digests.md) — Generates fixed-size cryptographic fingerprints to verify data integrity and create unique fingerprints. ([source](https://php.net/manual/en/refs.crypto.php))
- [SSL/TLS Certificate Management](https://awesome-repositories.com/f/security-cryptography/cryptography/ssl-tls-certificate-management.md) — Handles SSL/TLS certificates and asymmetric keys to establish secure encrypted connections. ([source](https://php.net/manual/en/refs.crypto.php))
- [Password Hashing Utilities](https://awesome-repositories.com/f/security-cryptography/security/cryptography-and-secrets/cryptographic-primitives-management/password-hashing-utilities.md) — Provides specialized algorithms for transforming passwords into secure, salted, and irreversible hashes. ([source](https://php.net/manual/en/refs.crypto.php))
- [Symmetric Encryption](https://awesome-repositories.com/f/security-cryptography/symmetric-encryption.md) — Implements encryption and decryption processes using a single shared secret key for data confidentiality. ([source](https://php.net/manual/en/refs.crypto.php))

### Operating Systems & Systems Programming

- [Dynamic Library Loading](https://awesome-repositories.com/f/operating-systems-systems-programming/dynamic-library-loading.md) — Supports loading shared libraries and optional feature modules at runtime to extend functionality.
- [File and Console I/O](https://awesome-repositories.com/f/operating-systems-systems-programming/file-i-o-management/i-o-polling/file-and-console-i-o.md) — Reads and writes data to local files, remote URLs, and memory buffers. ([source](https://php.net/manual/en/features.php))

### Software Engineering & Architecture

- [Concurrent Task Execution](https://awesome-repositories.com/f/software-engineering-architecture/concurrent-task-execution.md) — Supports non-blocking operations by pausing and resuming function execution via coroutines and fibers. ([source](https://php.net/manual/en/language.fibers.php))
- [Stream Wrapper Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/stream-wrapper-abstractions.md) — Uses a unified stream-wrapper abstraction to handle various protocols and filesystems as standard local files.
- [Stream Wrapper Configurations](https://awesome-repositories.com/f/software-engineering-architecture/stream-wrapper-abstractions/stream-wrapper-configurations.md) — Sets parameters for filesystem and stream wrappers to modify data transmission. ([source](https://php.net/manual/en/context.php))

### User Interface & Experience

- [XML String Generation](https://awesome-repositories.com/f/user-interface-experience/programmatic-element-construction/xml-and-html-element-constructors/xml-string-generation.md) — Constructs formatted XML documents and fragments through a writer interface. ([source](https://php.net/manual/en/refs.xml.php))
