PHP 8.1 is currently only receiving security fixes. PHP 8.1.5 is not the latest version in the series, and using this release is not recommended. PHP 8.1.29 is the latest in the series.
Downloads
Source Code
Git Clone
Use Git to clone the 8.1.5 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.1.5
How to compile PHP
PHP can be compiled by setting up the dependencies, building the configure script (
Detailed articles on how to compile PHP are available for Ubuntu/Debian based systems and Fedora/RHEL based systems.
./buildconf
), configuring the build ./configure
, and running make
.Detailed articles on how to compile PHP are available for Ubuntu/Debian based systems and Fedora/RHEL based systems.
Windows binaries
Non-Thread Safe Builds
Non-Thread Safe (NTS) builds are single-threaded PHP builds. They can be used on web servers that integrate PHP over FastCGI protocol, such as Nginx, Caddy, and IIS.
php-8.1.5-x64NTS.zip (29.23 MiB)
php-8.1.5-x86NTS.zip (26.29 MiB)
Thread-Safe Builds
Thread-Safe (TS) builds are multi-thread PHP builds, often used to integrate PHP as a Server API for multithreaded servers. The most common use case is using PHP as an Apache module.
php-8.1.5-x64TS.zip (29.33 MiB)
php-8.1.5-x86TS.zip (26.27 MiB)
Docker/Podman Containers
PHP CLI
PHP CLI Containers images only include the PHP CLI, and no FPM or Apache modules. The Alpine builds are lightweight, but may introduce incompatibilities due to their musl builds. Albeit their larger size, the Debian-based (without the "-alpine" suffix) images are more complete, and widely used.
Alpine-based: Lightweight, but may introduce incompatibilities due to their musl builds.
docker pull php:8.1.5-cli-alpine
Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.1.5-cli
PHP CLI + Web Server Integration
These container images include PHP CLI, and a web server integration. FPM container images can be integrated with web servers such as Nginx, Caddy, and Apache with Event MPM. The Apache container images include Apache web server, integrating PHP as an Apache module.
Alpine-based: Lightweight, but may introduce incompatibilities due to their musl builds.
docker pull php:8.1.5-fpm-alpine
Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.1.5-apache
Debian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.1.5-fpm
ChangeLog
Core
- Fixed bug GH-8176 (Enum values in property initializers leak).
- Fixed freeing of internal attribute arguments.
- Fixed bug GH-8070 (memory leak of internal function attribute hash).
- Fixed bug GH-8160 (ZTS support on Alpine is broken).
Filter
- Fixed signedness confusion in
php_filter_validate_domain()
.
Intl
- Fixed bug GH-8115 (Can't catch arg type deprecation when instantiating Intl classes).
- Fixed bug GH-8142 (Compilation error on cygwin).
- Fixed bug GH-7734 (Fix IntlPartsIterator key off-by-one error and first key).
MBString
- Fixed bug GH-8208 (
mb_encode_mimeheader
: $indent functionality broken).
MySQLi
- Fixed bug GH-8068 (mysqli_fetch_object creates inaccessible properties).
Pcntl
- Fixed bug GH-8142 (Compilation error on cygwin).
PgSQL
- Fixed result_type related stack corruption on LLP64 architectures.
- Fixed bug GH-8253 (
pg_insert()
fails for references).
Sockets
- Fixed Solaris builds.
- Fix undefined behavior in php_set_inet6_addr.
SPL
- Fixed bug GH-8121 (SplFileObject - seek and key with csv file inconsistent).
- Fixed bug GH-8192 (Cannot override
DirectoryIterator::current()
without return typehint in 8.1).
Standard
- Fixed bug GH-8048 (Force macOS to use statfs).
Commit List
Bob Weinand
- Fix GH-8176: Fix leaking enum values in property initializers in cbbf3502a2
- Fix freeing of internal attribute arguments in f095d2c91b
- Fix ZTS build after cherry-pick in 15949b61ba
Christoph M. Becker
- Fix GH-8121: SplFileObject - seek and key with csv file inconsistent in 1d9a1f9be3
- Fix GH-8068: mysqli_fetch_object creates inaccessible properties in ef29ddcc27
- Fix typo (--EXTENSION-- →
--EXTENSIONS--
) in b92ae85b25 - Fix GH-8208:
mb_encode_mimeheader
: $indent functionality broken in d0417ebc93 - Fix signedness confusion in
php_filter_validate_domain()
in 771dbdb319 - Fix result_type related stack corruption on LLP64 architectures in 5a8622fe78
- Fix GH-8253:
pg_insert()
fails for references in 0e6d6f83cc
David Carlier
- Fix GH-8142: Compilation error on cygwin in 8b15858c58
- Fix Solaris builds of
ext/sockets
in 7eb972c456
Dmitry Stogov
- Fix non-reentirant startiong or error recording from error handler in c6a53f9499
- Fixed memory leak in 151d2ac5ae
- Tracing JIT: Eliminate useless guards for CONCAT in 6c3816cee5
- Optimizer: Fix inorrect constant substitution in FETCH_LIST_R in 770a544af4
- JIT: Fix type store in 9792f0db76
- JIT: Fix register allocation in e20f955e44
- Fix memory leak in 2b7431cf5b
- Skip test for preloading in 33eec37830
- JIT: Fix missing exception handling in 3d6a7e2bd5
- JIT: Fix memory leak in 7051dc3372
- JIT: Fix missing type store in e9fc81a2f8
- JIT: Fix register clobbering in cf83bdd925
- JIT: Fixed memory leak in aa352c2c54
Ilija Tovilo
- Allowing catching arg type deprecations in intl classes in 925a30979c
- Fix IntlPartsIterator key off-by-one error in e706d024b2
- Register JSON_ERROR_NON_BACKED_ENUM constant in GH-8285
Kamil Tekiela
- Fix regression from #8058 in 06e383b2f4
- Fix mnd_malloc -> mnd_emalloc from previous merge in ced5581eca
Michael Voříšek
- Fix GH-8160: ZTS support on Alpine is broken in 2b2aeb989e
Nikita Popov
- Make DirectoryIterator
current()
/key()
return types tentative in d0a0518798
Patrick Allaert
- Bump for 8.1.5-dev in 723058c3bf
- Update versions for PHP 8.1.5 in 1f44c7e91c
Remi Collet
run-tests.php
: fix TypeError: Unsupported operand types: string * int <n> is mandatory for--show-slow
and--set-timeout
use <n> in help message instead of confusing [n] in 23cce68d24- typo in fe4aba6588
risner
- Fix GH-8048: disk_*_space wrong for some filesystems on macOS in 57ef16bb5d
Stanislav Malyshev
- Don't try to access memory outside string in 2119ba215a
Tim Düsterhus
- Fix memory leak of function attribute hash table in GH-8070
- Add tests for function parameter attributes to ext/
zend_test
in 070012d62a