PHP 8.1 is currently only receiving security fixes. PHP 8.1.6 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.6
./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.6-cli-alpine
docker pull php:8.1.6-cli
docker pull php:8.1.6-fpm-alpine
docker pull php:8.1.6-apache
docker pull php:8.1.6-fpm
ChangeLog
Core
- Fixed bug GH-8310 (Registry settings are no longer recognized).
- Fixed potential race condition during resource ID allocation.
- Fixed bug GH-8133 (Preloading of constants containing arrays with enums segfaults).
- Fixed Haiku ZTS builds.
Date
- Fixed bug GH-7752 (
DateTimeZone::getTransitions()
returns insufficient data). - Fixed bug GH-8108 (Timezone doesn't work as intended).
- Fixed bug #81660 (
DateTimeZone::getTransitions()
returns invalid data). - Fixed bug GH-8289 (Exceptions thrown within a yielded from iterator are not rethrown into the generator).
FFI
- Fixed bug GH-8433 (Assigning function pointers to structs in FFI leaks).
FPM
- Fixed bug #76003 (FPM /status reports wrong number of active processe).
- Fixed bug #77023 (FPM cannot shutdown processes).
- Fixed comment in kqueue remove callback log message.
Hash
- Fixed bug #81714 (segfault when serializing finalized HashContext).
Iconv
- Fixed bug GH-8218 (ob_end_clean does not reset Content-Encoding header).
Intl
- Fixed bug GH-8364 (msgfmt_format $values may not support references).
MBString
- Number of error markers emitted for invalid UTF-8 text matches WHATWG specification. This is a return to the behavior of PHP 8.0 and earlier.
MySQLi
- Fixed bug GH-8267 (MySQLi uses unsupported format specifier on Windows).
OPcache
- Fixed bug GH-8063 (OPcache breaks autoloading after E_COMPILE_ERROR).
SPL
- Fixed bug GH-8366 (ArrayIterator may leak when calling __construct()).
- Fixed bug GH-8273 (SplFileObject:
key()
returns wrong value).
Streams
- Fixed php://temp does not preserve file-position when switched to temporary file.
zlib
- Fixed bug GH-8218 (ob_end_clean does not reset Content-Encoding header).
Commit List
Alex Dowad
- Error handling for UTF-8 complies with WHATWG specification in 04e59c916f
Arnaud Le Blanc
- Clear recorded errors before executing shutdown functions in f20e11cbe1
Ben Ramsey
- Prepare for PHP 8.1.6 GA in 11fde11221
- Update versions for PHP 8.1.6 in 4d2e782aaa
Bernd Holzmüller
- Preserve file-position when php://temp switches to temporary file in 84c18f9f04
Bob Weinand
- Fix GH-8289: Exceptions thrown within a yielded from iterator are not rethrown into the generator in 13649451c2
- Fix deprecated warning in new
gh8289.phpt
test in e4c7ffc152 - Ensure correct target opline for exceptions thrown during yield from in 9cb512ecc1
- Fix GH-8433: Assigning function pointers to structs in FFI leaks memory in 2397e7685e
- Add missing
SKIPIF
for newext/ffi
test in a74b865123
Christoph M. Becker
- Bump version in 43f3745abb
- Fix #81714: segfault when serializing finalized HashContext in c2eafc29f5
- Fix GH-8310: Registry settings are no longer recognized in 1bd9890b20
- Fix GH-8267: MySQLi uses unsupported format specifier on Windows in 7c702b72f2
- Fix GH-8366: ArrayIterator may leak when calling __construct() in 1762a87932
- Fix GH-8408:
bug68547.phpt
fails without multibyte support in dad5cb442d - Fix GH-8364: msgfmt_format $values may not support references in f5d9e7c031
- Fix GH-8218: ob_end_clean does not reset Content-Encoding header in 30f4c725cb
Cody Mann
- GH-7979: iterator advances when checking if valid in 287c8a86b4
- style/readability updates in 24085d0192
David Carlier
- Fix FPM zlog warning with var being uninitialized in fc9fecbd09
- Fix FPM socket clean up reallocation clang build warning in 2f0918c638
- Fix FPM kqueue handler fix remove callback typo in ff90d42b8b
- Haiku fix ZTS build disabling
tsrm_ls_cache
usage in 4bb0dd49d8
Derick Rethans
- Fixed #7752, #8101, #81660:
DateTimeZone::getTransitions()
returns insufficient data in e6c4988187 - Updated to version 2022.1 (2022a) in 341bea37e8
- Empty merge in 9efaf3c54b
- Updated to version 2022.1 (2022a) in 7aefee1613
- Empty merge in 5e57cf9691
- Updated to version 2022.1 (2022a) in 7e829d1536
- Prep NEWS for 7.4.29 release in 1a0514992d
- Add tz update into NEWS in c14e2e4fc9
- Prepare for 7.4.30 in fbee73df14
- Refactor code to avoid duplication in e38d300a70
- Merged pull request #8175 in 789f6b8367
- Fixed GH-8400:
bug73837.phpt
makes no sense in c854bb2472 - Return early when the timezone info is NULL in 87f341b1c2
- Use the new RETURN_THROWS() instead of just returning NULL in b461c4673b
Dmitry Stogov
- Fix
arsort()
crash on recursion in 14fddd17df - JIT: Fixed incorrect code generation in 0d44bbd212
- Trcing JIT: remove unchecked type guards om ROPE_* instructions in 33704be5f2
- Fixed reference counting inference in c0bb238483
- JIT: Fix array clobbering by user error handler in c489e360a6
- Tracing JIT: Fixed incorrect assumption about stack slot type in 5b048dd05c
- JIT: Fix memory lek in 3aaf2f6f89
- JIT: Fixed incorrect guard in c3a30544ad
- Fix type narrowing warning during type inference of
ZEND_FETCH_DIM_W
in 8286de2fd3 - Fix type inference in 3e78964742
- Reorder optimization passes to avoid miss-optimization in 3b735456c6
- Fix ISSET_ISEMPTY_VAR missoptimization in 948ef10dd0
- Fixed tests in 3564eaff42
Gabriel Caruso
- Prepare for PHP 8.0.20 in 52a18a6620
George Peter Banyard
- Fix GH-8273: SplFileObject:
key()
returns wrong value in 6186ecd436 - Fix GH-8273: SplFileObject:
key()
returns wrong value in 660ef91fbc
Ilija Tovilo
- Re-enable i386 tests on Azure Pipelines in d82d62c237
- Add nightly for GitHub actions in 5de1cd9e48
- Remove issue_comment trigger on nightly in 9af3759987
- Run nightly on php org only unless triggered via workflow_dispatch in cd90ddca85
- Fix preloading of constants containing enums in 4397811db2
- Only check tracked files in verify-generated-files in 1dc6dba014
- Add missing news entry for GH-8421 in 4d6965dcec
Jakub Zelenka
- Fix bug #76003: FPM /status reports wrong number of active processe in 33bb201b3e
- Fix bug #77023: FPM cannot shutdown processes in d8612fb6b7
Michael Voříšek
- Fix opcache testing in CI in e3f2846bbb
- Verify generated files are up to date in CI in 36de002cc6
Mikko Pesari
- Fix
openssl_csr_export()
stub in 16bf8331e0
Máté Kocsis
- Mark
ext/mysqli
properties as readonly for documentation purposes in 2b4fee03af
Nikita Popov
- Improve file/line information for narrowing warning in 323f3c6914
- Improve type narrowing fix in c72e9621ce
- Fix inference for assignment of known object to reference in b08aac0451
- Don't use CE info from pi node for MAY_BE_REF var in 41f33b9dc3
- Don't use CE for by-ref arguments in 5d072578cd
- Move MAY_BE_REF check into COPY_SSA_OBJ_TYPE in d16d251e20
- Don't set ce for by-ref return type in b0ab5d0fb0
- Don't optimize trailing args for prototype fbc in 11f950e77e
- Move check for named params in fcall optimization earlier in 18b4e36df1
Ollie Read
- Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method in d0f1b987a5
Patrick Allaert
- Bump for 8.1.6-dev in 5a899563cc
ryancaicse
- Move locks in TSRM.c to prevent races in 1a75269c8e
Tim Düsterhus
- Fix
--EXTENSIONS--
section for two tests in ext/zend_test
in 5655f1abe3