PHP 8.1 is currently only receiving security fixes. PHP 8.1.2 is not the latest version in the series, and using this release is not recommended. PHP 8.1.30 is the latest in the series.
Downloads
Source Code
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.1.2
./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
Docker/Podman Containers
docker pull php:8.1.2-cli-alpine
docker pull php:8.1.2-cli
docker pull php:8.1.2-fpm-alpine
docker pull php:8.1.2-apache
docker pull php:8.1.2-fpm
ChangeLog
Core
- Fixed bug #81216 (Nullsafe operator leaks dynamic property name).
- Fixed bug #81684 (Using null coalesce assignment with $GLOBALS["x"] produces opcode error).
- Fixed bug #81656 (GCC-11 silently ignores -R).
- Fixed bug #81683 (Misleading "access type ... must be public" error message on final or abstract interface methods).
- Fixed bug #81585 (cached_chunks are not counted to real_size on shutdown).
- Fixed bug GH-7757 (Multi-inherited final constant causes fatal error).
- Fixed
zend_fibers.c
build with ZEND_FIBER_UCONTEXT. - Added riscv64 support for fibers.
Filter
- Fixed FILTER_FLAG_NO_RES_RANGE flag.
Hash
- Fixed bug GH-7759 (Incorrect return types for
hash()
andhash_hmac()
). - Fixed bug GH-7826 (Inconsistent argument name in
hash_hmac_file
andhash_file
).
MBString
- Fixed bug #81693 (
mb_check_encoding
(7bit) segfaults).
MySQLi
- Fixed bug #81658 (MYSQL_OPT_LOAD_DATA_LOCAL_DIR not available in MariaDB).
- Introduced MYSQLI_IS_MARIADB.
- Fixed bug GH-7746 (mysqli_sql_exception->getSqlState()).
MySQLnd
- Fixed bug where large bigints may be truncated.
OCI8
- Fixed bug GH-7765 (
php_oci_cleanup_global_handles
segfaults at second call).
OPcache
- Fixed bug #81679 (Tracing JIT crashes on reattaching).
Readline
- Fixed bug #81598 (Cannot input unicode characters in PHP 8 interactive shell).
Reflection
- Fixed bug #81681 (ReflectionEnum throwing exceptions).
PDO_PGSQL
- Fixed error message allocation of PDO PgSQL.
Sockets
- Avoid void* arithmetic in sockets/multicast.c on NetBSD.
- Fixed
ext/sockets
build on Haiku.
Spl
- Fixed bug #75917 (
SplFileObject::seek
broken with CSV flags). - Fixed bug GH-7809 (Cloning a faked SplFileInfo object may segfault).
Standard
Commit List
Alex Dowad
mb_convert_encoding
will not auto-detect input string as UUEncode, Base64, QPrint in f07c193583
Aliaksandr Bystry
- Fix #75917:
SplFileObject::seek
broken with CSV flags in daf79e2d91
Ben Ramsey
- Reset versions to -dev for the PHP-8.1.2 branch in b54888a839
- 8.1.2 GA in 3fefac77ec
- Update versions for PHP 8.1.2 in 899b6de55d
Christoph M. Becker
- Fix #81681: ReflectionEnum throwing exceptions in 59dd4fd742
- Fix #81693:
mb_check_encoding
(7bit) segfaults in 929d847152 - Use php/php-sdk-binary-tools.git for AppVeyor builds in 582a291c98
- Skip
bug_36798.phpt
for PDO_DBLIB in efb901ebed - Fix #81585: cached_chunks are not counted to real_size on shutdown in 5675ebe649
- Fix GH-7748: gethostbyaddr outputs binary string in 7daf01258d
- Fix
openssl_x509_checkpurpose_basic.phpt
in 98175fc7f1 - Fix GH-7759: Incorrect return types for
hash()
andhash_hmac()
in 0b3a937670 - macOS 10.14 runners are no longer available via Azure Pipeline in 6d5f2ba78d
- Fix GH-7757: Multi-inherited final constant causes fatal error in 206c521a1f
- Fix GH-7765:
php_oci_cleanup_global_handles
segfaults at second call in c435e67746 - Fix #81679: Tracing JIT crashes on reattaching in 49380b59d2
- $context parameter of
get_headers()
is nullable in c5f4ee50ab - Fix GH-7809: Cloning a faked SplFileInfo object may segfault in 0ed39ed809
- Fix chunk_split_variation*_32bit.phpt for Windows in b4ba65dd9d
- Fix GH-7826: Inconsistent argument name in
hash_hmac_file
andhash_file
in fd3fc5c193 - Prevent strict interpretation of tentative definition in e76ddbd2f6
- Mark curl tests using http2.golang.org as
XFAIL
in 5005445994 - Fix bug40228*.phpt conflict in 7f0a1e2f2d
- Revert "Fix
zend_observer_fcall_end_all()
accessing dangling pointers" in ee610947ce - Don't truncate subsecond precision in
run-tests.php
JUNIT output in 87d9e02f01 mysqli_next_result_no_repeat_error.phpt
must not use--EXTENSIONS--
in d963b3f015
David Carlier
- Fix #81658: MYSQL_OPT_LOAD_DATA_LOCAL_DIR not available in MariaDB in 15e7e570a5
- socket: ancillary credentials build fix for non linux systems in 51647eb23e
- socket cmsg credential test fixes, "backporting" from the FreeBSD PR in 80b02275bb
- Avoid void* arithmetic in sockets/multicast.c on NetBSD in 3f0bb67361
- Fix buffer allocations in
zlog_stream_set_msg_suffix()
in cb3d858745 - Fix
ext/sockets
build on Haiku in 09165ace37
David CARLIER
- zend gdb detection fix on FreeBSD in 62bcb31706
David Warner
- Fix GH-7815:
php_uname
doesn't recognise latest Windows versions in f82593d597
Dmitry Stogov
- Fix yet another indirect string modification by error handler problem in 94286cd596
- JIT: Fix ASSIGN_DIM_OP with undefined variable and index and user error handler, throwing an exception in 2fde308fc6
- Add test in 42a162e535
- Tracing JIT: Fixed Zend/tests/str_offset_008.phpt failure in c4ee66856e
- JIT: Fix register clobbering in 2515e788bc
- Fix array object clobbering by user error handler in 1d054b3fa7
- ws in 4a5c05a49d
- Add test in 8d7d87cdc4
- Add missing "return" in c9901aa594
- Fixed bug #81216 (Nullsafe operator leaks dynamic property name) in 307e476e86
- Fix refcount inferemce ($a += $a returns old array with RCN) in aa7280264e
- Fix use after free because of data clobbering by user error handler in 5459ed4c2f
- JIT: Fix incorrect elimination of type store in c29f6baaee
- Fixed incorrect DCE of a constructor call in 7b629afe4e
- Separate "cold" code in 08f1d470fb
- Fix crush after compilation of nullsafe operator introduced in 307e476e in 7e080183f4
- Fix incorrect JMP optimization in 0ac3d78d7d
- Remove range inference for booleans in 6f42c073cf
- JIT: Fix crash during compilation of function with incompletely constructed SSA in e79dbe1124
- Fix incorrect optimization that leads to memory leak in 230de7721f
- Fix array clobering by user error handler in cbc0b1afeb
- Tracing JIT: Fix reference counting in fe320e83ae
- Combine ADDREF/DELREF in c787f42ceb
- Preloading: don't remove INCLUDE_OE_EVAL nstructions with used result in cd8e6f5f7b
- Move common code into helper in b16fc350a4
- Fix array clobbering by user error handler in 75b2973974
- JIT: Fix incorrect type store elimination in 66306030ad
- Fix array clobbering by user error handler in 2745cd9997
- Fix type inference for INIT_ARRAY with invalid index in f18bb2477f
- JIT: Fix register clobbering in 7c674e1aa7
- Fix incorrect optimization of ASSIGN_OP that may lead to memory leak in e004e844f7
- JIT: Fix incorrect JIT prologur size for CLANG/x86 build in 6d5922bed5
- Fixed compilation warning in cb10ac1d53
- Fix memory leak in SCCP in 2b81156f2a
- Fix reference contig inference in de358f856f
- JIT: Fix array clobbering by user error handler in fd879e6fe4
- iSeparate tests in 206bcff50d
Florian Sowade
- Fix
zend_observer_fcall_end_all()
accessing dangling pointers in 76e2a8380e
Gabriel Caruso
- Prepare for PHP 8.0.16 in d70c69839c
Ilija Tovilo
- Fix invalid opcode for ??= on $GLOBALS in dab6226cbe
- Improve final/abstract methods in interfaces error messages in b991ce9c1e
Jeremie Courreges-Anglas
- riscv64 support for fibers in 70b02d75f2
Kamil Tekiela
- Fix bug GH-7746 (mysqli_sql_exception->sqlstate is inaccessible) in 8869bbe0e9
- Fix formatting in the new mysqli test in 49512b6b36
Michael Wallner
- fix #81656: GCC-11 silently ignores -R in 1f38c003d2
Máté Kocsis
- Fix the value param of
SimpleXMLElement::addAttribute()
in 713dcb2818 - Remove bogus type of $object param in
SplObjectStorage::offsetSet()
in 24be11f632 - Redefine PDOException::$code with correct type in 96a5026bfd
- Mark mysqli_driver properties readonly in f70ca0acd4
NathanFreeman
- Fix bug where large bigints may be truncated in b3903515bf
Nikita Popov
- Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default in 26e424465c
- Don't convert assign op operand types in opcache in cf377eefa6
- Handle holes in
zend_get_opcode_id()
in b63e4cf727
Patrick Allaert
- Prepare for 8.1.2 in 628670c391
- Preparing for 8.1.2RC1 in 3dbabf09ff
Petr Sumbera
- Fix
zend_fibers.c
build withZEND_FIBER_UCONTEXT
in 069bbf3e80
SATO Kentaro
- Fix error message allocation of PDO PgSQL in 778513f605
Yifan Tong
- Fix FILTER_FLAG_NO_RES_RANGE flag in 3587e13ab3