PHP 8.0 is currently only receiving security fixes. PHP 8.0.12 is not the latest version in the series, and using this release is not recommended. PHP 8.0.30 is the latest in the series.
Downloads
Source Code
Git Clone
Use Git to clone the 8.0.12 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.0.12
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.0.12-x64NTS.zip (25.41 MiB)
php-8.0.12-x86NTS.zip (23.55 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.0.12-x64TS.zip (25.51 MiB)
php-8.0.12-x86TS.zip (23.55 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.0.12-cli-alpine
Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.0.12-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.0.12-fpm-alpine
Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.0.12-apache
Debian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.0.12-fpm
ChangeLog
CLI
- Fixed bug #81496 (Server logs incorrect request method).
Core
- Fixed bug #81435 (Observer current_observed_frame may point to an old (overwritten) frame).
- Fixed bug #81380 (Observer may not be initialized properly).
DOM
- Fixed bug #81433 (
DOMElement::setIdAttribute()
called twice may remove ID).
FFI
- Fixed bug #79576 ("TYPE *" shows unhelpful message when type is not defined).
Fileinfo
- Fixed bug #78987 (High memory usage during encoding detection).
Filter
- Fixed bug #61700 (FILTER_FLAG_IPV6/FILTER_FLAG_NO_PRIV|RES_RANGE failing).
FPM
- Fixed bug #81026 (PHP-FPM oob R/W in root process leading to privilege escalation) (CVE-2021-21703).
Opcache
- Fixed bug #81472 (Cannot support large linux major/minor device number when read /proc/self/maps).
Reflection
- ReflectionAttribute is no longer final.
SPL
- Fixed bug #80663 (Recursive
SplFixedArray::setSize()
may cause double-free). - Fixed bug #81477 (LimitIterator + SplFileObject regression in 8.0.1).
Standard
- Fixed bug #69751 (Change Error message of sprintf/printf for missing/typo position specifier).
Streams
- Fixed bug #81475 (
stream_isatty
emits warning with attached stream wrapper).
XML
- Fixed bug #70962 (XML_OPTION_SKIP_WHITE strips embedded whitespace).
Zip
Commit List
Aliaksandr Bystry
- Fix #70962: XML_OPTION_SKIP_WHITE strips embedded whitespace in a9661a5293
- Fix bug #69751 in 41df5c0675
Anatol Belski
- fileinfo: Fixed bug #78987 High memory usage during encoding detection in fa96c7e000
- libmagic: Update patch in 3c40d9bf77
- fileinfo: Adjust value in test in 0208374ad4
- fileinfo: Capture more sizes for test as delivered by AppVeyor in e56435c86d
- fileinfo: Capture more sizes for test as delivered by travis-ci in 6e0acece68
- fileinfo: Fix test value for s390x on travis-ci in 8f75ab0dfc
- NEWS: Add note for bug #78987 in 49c9fbbfe2
- NEWS: Add note for bug #78987 in 125f305b1d
Bob Weinand
- Fix #81435 Observer current_observed_frame may point to an old (overwritten) frame in 12b0f1b7cc
Christoph M. Becker
- Fix #81424: PCRE2 10.35 JIT performance regression in a2471383fe
- Fix OOB read due to
timezone_open()
with 5 digit offset in fac3fbcb07 - Fix #61700: FILTER_FLAG_IPV6/FILTER_FLAG_NO_PRIV|RES_RANGE failing in 288c25f7d1
- Fix #81420:
ZipArchive::extractTo
extracts outside of destination in df2ceac25a - 7.3.32 is next in f2f40b1cf7
- Fix #80663: Recursive
SplFixedArray::setSize()
may cause double-free in 2d6684091f - Fix #81475:
stream_isatty
emits warning with attached stream wrapper in 23e13e2c8f - Fix #81477: LimitIterator + SplFileObject regression in 8.0.1 in ee5711de33
- Fix #81490:
ZipArchive::extractTo()
may leak memory in 4d44271415 - Fix #77978: Dirname ending in colon unzips to wrong dir in e0c0de003b
- Revert "Fix #81424: PCRE2 10.35 JIT performance regression" in a19f655b84
Derick Rethans
- The PHP 7.4 branch is for PHP 7.4.25 now in 95a943e2f0
- Prepare branch for 7.4.26-dev in e5d35a3252
Dmitry Stogov
- JIT: fixed MUL+SEND optimization when MUL throws an exception in 06275d940c
- Properly check if BIND_STATIC may throw in ebd1a0a656
- Fixed bug #79576 ("TYPE *" shows unhelpful message when type is not defined) in 0badc7de96
- Fixed error message in de20a89b06
- Fixed error message in 23327bf4b3
- JIT: Fixed call chain construction in 236e7aef01
- JIT: Fixed memory leak in BOOL_NOT when opearnd ia a reference to bool in 5e3eaf14fe
- JIT: Fixed warning when assign undefined variable to property in 04209de93c
- JIT: keep register value across call in 015cafa38c
- JIT: Fixed incorrect assignment of undefined variable in 01cfd5e4f9
- JIT x86: Fixed register clobbering in code produced for "$x[$y] %= $z" in f0f774a129
- JIT x86: Fixed incorrect EX(func) initialization for recursive calls in 0e0f50b413
- JIT: Disable recursive call optimization for VM without global register variables in 48d050ef72
- Tracing JIT: Fixed bug in register allocator in 19854371ed
- JIT: Fixed JIT for FETCH_OBJ when op1 is a reference of non-object in 7a93a8a6fd
- Fixed type inference in e588f24276
- JIT: Fixed possible memory leak in 09d4037a17
- Check for
zend_shared_alloc()
failures in 17a99f2b11 - Tracing JIT: Fixed possible stack-buffer-overflow in 08100e81e5
- Tracing JIT: Remove incorrect assertion in 430454268f
- Tracing JIT: Fixed possible incorrect megamorphic call from a trait in 3e6919cfb3
- JIT: Fixed missed zval type initialization in 9ce388b41b
- JIT: Split
zend_jit_hash_index_lookup_rw()
intozend_jit_hash_index_lookup_rw()
andzend_jit_hash_index_lookup_rw_no_packed()
in 325865d750 - JIT: Call
zend_hash_index_find()
instead of_zend_hash_index_find()
if we didn't check for packed array before in 2e02b1f157 - JIT: Fixed result when assigning to typed reference in 17b127a84f
- JIT: Fixed label mess in 3fd1f6cdad
- Tracing JIT: Fixed possible memory-leak or missed destructor call in c30298bf57
- JIT x86: Fixed NaN handling in 7710047ed1
- JIT: Fixed memory leak in 4b31cb3eb8
- JIT: Fixed incorrect named parameter handling in 512dfaba3a
- Fixed SSA construction in 22ef1fb832
- Fixed assign coalesce. "$a[0] ??= $a" should evaluate the right $a first in 69fb20f106
- JIT: Fixed register clobbering in f681f9075c
Gabriel Caruso
- Prepare for PHP 8.0.12 GA in 71810dd376
- Update versions for PHP 8.0.12 in 6b43e8e067
George Peter Banyard
- Fix param name order for
Phar::copy()
in 0d0c9acafb - Fix Bug #81462
mime_content_type()
indicates wrong arg num on TypeError in 0ea38b9509
Hao Sun
- JIT: Fixed exit from CALL VM with GCC Global Register Variables in cfb21e8dc1
- ARM64:
range.phpt
failed under RELEASE mode in 6f6fd27d2f
Jakub Zelenka
- Add FPM prod idle timeout test in 08f52b1643
- Add FPM prod idle timeout test with 6s sleep in edfb347019
- Add the actual test for FPM prod idle timeout test with 6s sleep in 66a655fdf4
- Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation) in ea58ca0aff
Joe Watkins
- Fix #81380 observer may not be initialized properly in c884a5a21e
Lauri Kenttä
- Fix #81496: CLI server logs wrong request method in cdcdb33080
Lin Yang
- Fix bug #81472: Support large device major/minor number in 9ad8fadcbb
Matteo Beccati
- Add test for
pg_put_line()
andpg_end_copy()
in be36bf5aca
Michael Voříšek
- Fix gdAlphaMax limit typo in 2c3dfe5160
Nikita Popov
- Don't overwrite unwind exception in 85b80c5aaf
- Fix jump after
zend_jit_invalid_property_assign()
in b0e16f0e4f - Save register before throwing undef var notice in e22fb46127
- Check whether expected types are present for compound op jit in bac054dbf3
- Also make sure binary op operands can't be undef in 8c3d33a054
- Check that POST_INC/DEC has use in DFA optimization in 5cae6b9b0d
- Handle undef value in assign_dim jit in e7663785a7
- BIND_STATIC may throw in b610dce079
- Use wildcard for error message in 5d702e33a2
- Fix BIND_STATIC may_throw check in 1b376b06fb
- Fix func/class name use after free on opcache OOM condition in 10e9f6b340
- Fix JIT for recursive call with too few args in 10bbff8758
- Handle undef assignment to typed ref in 3ee85ccd4a
- Don't undef result operand if there is none in 6de8b08f60
- Handle SWITCH_STRING with optimized away FREE in 7257e7e5aa
- Fix may_throw for ASSIGN_OBJ in 1548418461
- Don't const evaluate increment of array in SCCP in 4c8093a9f1
- Undef result on throwing typed reference assignment in 83f283f5ea
- Fix persistent smart_str allocation in af8fccee9c
- Don't jit FE_RESET_R with undef operand in d46b10296e
- Fix SEND_USER with ref arg in 01453a0af7
- Fix FETCH_OBJ_IS type inference in a49a309386
- Use ephemeral ports in socket test in 07f6c61c8e
- Make
setcookie()
test more robust against the passage of time in b4d7387468 - Don't replace values in unreachable code in sccp in 1b33da5dd2
- Fix persistent smart_str allocation in 549cb4406e
- Fix missing undef checks for comparisons in 95e0cc06a2
- Check for undef var in typed property assignment in f4bcf8c393
- Don't unconditionally add array value type for undef in 61445248cb
- Fix JIT typed property inc/dec in 770879702a
- Fix ASSIGN_STATIC_PROP_REF type inference in 983a4fc4a3
- Bail on exception during delayed autoload in be8217368b
- Fix leak when iterating uninitialized RecursiveIteratorIterator in 3adbafeef7
- Handle pi nodes in replace_predecessor in 038bc27787
- Fix DCE of unreachable phi in cycle in ddf8910237
- Start block at loop var free in 823888c472
- Fix relative offsets when copying JMPZNZ in 7d483418e2
- Fix block marking for two arm math in 17d6efc729
- Check exception after QM_ASSIGN of undef var in f381079398
- Undef result if undef dim warning promoted to exception in fe1633f010
- Check exception before using
undef_result_after_exception()
in 0391c55b0c - Fix type inference and SCCP with typed references in d8c2ff6486
- Remove outdated code in ASSIGN_DIM type inference in cdc05eba61
- Fix ASSIGN_DIM result inference with typed refs in 1bb7ee3207
- Fix leak of invalid
stream_read()
return value in 2f798d99b7 - Fix leak with ASSIGN_OBJ on null in 97b5eeeb6c
- Handle throwing destructor in BIND_STATIC in ec54ffad1e
- Fix cache slot assignment for ASSIGN_OBJ_OP in d0860f67ca
- Create reference wrappers in SEND_UNPACK if necessary in e11faad233
- Revert "Add FPM prod idle timeout test" in 69514e6ffb
- Disable failing FPM test in 4c01bd2ade
- Fix COPY_TMP live range construction after optimization in bbd3f714d7
- POST_INC_OBJ/POST_DEC_OBJ don't have optional result in c958adce70
- Fix return type verification with undef var in f890c9c5e3
- Fix duplicate undef warning in assign_dim_op in 11a9b036a8
Sara Golemon
- Prep for 8.0.12 in 5e1e4a8963
sasezaki
- Fix bug #81474: Make ReflectionAttribute non-final in e286313fa7
Tyson Andre
Viktor
- Fix #81433:
DOMElement::setIdAttribute()
called twice may remove ID in 424c265478