Release Information
- Release Type
- Security Update
- Release Status
- Latest Release in 8.4
- Branch Status
- Supported
Latest release for PHP 8.4. This release contains security fixes, and it is recommended to update as soon as possible.
PHP 8.4 continues to receive bug fixes and security fixes until 2026-12-31.
Downloads
Source Code
Git Clone
Use Git to clone the 8.4.27 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.4.27How 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.4.27-x64NTS.zip
Size: 33.66 MiB SHA256:
93bd8a815a52156606fb906d0573437908c61f96e2cc52c03a51e36a41bf5236 php-8.4.27-x86NTS.zip
Size: 30.31 MiB SHA256:
c9f9b497458540622f443751dc553fbbd6e2974a005bb17a08ccfdcca2994d0d 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.4.27-x64TS.zip
Size: 33.82 MiB SHA256:
7902fe891ff4b035d431fd429a2ec1df193ba1f6fedba425d861790465c64e6b php-8.4.27-x86TS.zip
Size: 30.39 MiB SHA256:
b1f02421a1f92e65930cdf6d5819138cd4ceb120740ef05968387fe72a3c6bda ChangeLog
Core
- Fixed GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp (Avoid state corruption via bailout). (CVE-2026-109618, CVE-2026-109619)
- Fix GH-21999: GC inconsistency with lazy object,
var_dump(), and object comparison. - Fixed OSS-Fuzz #536440507 (Immutable class incorrect assertion).
- Fixed AVX being reported as supported when the OS has not enabled AVX state.
- Fixed GH-23980 (
ZEND_ASSERTviolation @ZEND_INCLUDE_OR_EVAL). - Fixed bug GH-23896 (Assertion failure in
zend_call_function()after a throwing deprecation). - Fixed use-after-free when a dl()-loaded extension declares a frameless function and a later request calls it.
- Fixed System V shared memory emulation for Windows attaching segments past the end of their mapping.
- Fixed bug GH-24050 (GC frees an object still held by a resurrected closure when (object) and use share an array).
- Fixed use-after-free when a Fiber callable resolves to
$thisof the method creating the Fiber ([A::class, 'm'] or "A::m") and that object dies before the Fiber runs. - Fixed exception thrown by destructor during GC in a Fiber not being rethrown into the frame that triggered the GC.
- Fixed bug GH-24139 (NULL pointer dereference in
php_ini.cwhenexpand_filepath()fails).
BCMath
- Fixed BcMath\Number results that truncate to zero keeping a negative sign and comparing less than zero.
BZ2
- Fixed double close of the descriptor and use-after-free of the inner stream when
bzopen()is given a stream resource.
CLI
- Fix GH-22567 (Windows ZTS CLI SAPI should refresh its TSRMLS cache during request activation).
- Fixed bug GH-23764 (Built-in server leaks a file descriptor on every HEAD request for a static file).
- Fixed crash in the built-in server when a client is reset before being accepted.
- Fixed the built-in server truncating an error page and leaking its unsent part after a partial socket write.
DOM
- Fixed use-after-free when re-constructing a DOMXPath whose php:function registrations are freed while still reachable from the cycle collector.
- Fixed bug GH-23365 (DOMNode::insertBefore($n, $n) drops the node and leaves a self-referencing sibling list).
- Fixed
Dom\HTMLDocument::getElementById()not finding ids of SVG and MathML elements. - Fixed Dom\HTMLDocument giving attributes the namespace of their element when a fragment is parsed with an xlink, xml or xmlns context element.
- Fixed bug GH-23729 (
DOMXPath::__construct()use-after-free during an evaluation). - Fixed bug GH-23897 (php:
function()assertion failure after a failed registerPHPFunctions()). - Fixed DOMXPath and Dom\XPath losing the context node and in-scope namespaces of an evaluation after a php:
function()callback evaluated another expression on the same object.
FFI
- Fixed crashes with FFI callbacks created from
__call()trampolines and array callables whose object is released.
FTP
- Fixed bug GH-23619 (cryptic error on servers that don't support TLS session resumption on data connection).
GD
- Fixed undefined behavior with GD2 images with
INT_MAX-sized chunks. - Fixed undefined behavior with GIFs with problematic LZW compression data.
Intl
- Fixed
IntlDateFormatter::parse(),localtime()and parseToCalendar() treating the offset as UTF-16 code units instead of bytes. - Fixed cloning IntlDateFormatter and MessageFormatter losing PHP-side state such as dateType, timeType, calendar and the message pattern.
- Fixed Collator attribute and strength methods not rejecting an unconstructed Collator.
- Fixed
grapheme_strstr()andgrapheme_stristr()returning incorrect substrings when supplementary characters precede the match. - Fixed
grapheme_strstr()andgrapheme_strpos()missing canonically equivalent matches, and grapheme searches reporting ICU errors for empty haystacks. - Fixed
grapheme_strrpos()andgrapheme_strripos()skipping overlapping matches when using a negative offset. - Fixed
grapheme_extract()returning an incorrect next offset when starting inside a multibyte UTF-8 character.
Lexbor
- Merge patches lexbor/lexbor@8a14bc0 and lexbor/lexbor@f67ce4b, fixing a heap buffer overflow in :lexbor-
contains()parsing and buffer overflows in malformed decode replay.
MBString
- Fixed bug GH-23106 (
mb_strpos()reads past the end of a haystack ending in a truncated UTF-8 sequence). - Fixed mbstring functions emitting surrogates in UTF-8 output and flagging it as valid UTF-8.
MySQLi
- Fix GH-22854: Fixed failed assertion when accessing mysqli property after failed reconnection.
MySQLnd
- Fixed field_count not resetting on OK packet.
- Fixed memory leak when closing a prepared statement after its connection was killed.
Opcache
- Fixed OSS-Fuzz #546798343 (Heap-buffer-overflow in optimizer with FCCs and inlining).
- Fixed bug GH-23693 (Tracing JIT produces wrong results for a guard on a loop-invariant addition).
- Fixed OSS-Fuzz #5674034779193344 (Read of uninitialized memory in
is_cacheable_stream_path()). - Fix
zend_analyze_calls()call_stack buffer overrun. - Fixed bug GH-23637 (PHP-FPM worker SIGSEGV: run_time_cache map_ptr offset beyond CG(map_ptr_last) when a class is reached through the CE cache).
- Fix multiple incorrect DCE due to unsound escape analysis.
- Fixed bug GH-24063 (OPcache optimizer folds
$cond ? -0.0 : 0.0into a single-0.0constant). - Fixed crash when a file cache is reused with a different set of extensions declaring frameless functions.
- Fixed bug GH-23991 (JIT generates invalid IR for multiple recursive calls).
- Fix SCCP evaluation of isset()/
empty()on dimension of non-escaping object.
OpenSSL
- Fixed
stream_socket_enable_crypto()leaving the socket non-blocking after a handshake timeout. - Fixed
feof()on a TLS stream staying false after a close_notify on Windows.
PCNTL
- Fixed
pcntl_signal_dispatch()dropping the queued signals when it runs while an exception is pending. - Fixed
pcntl_signal_dispatch()dropping the signals queued behind a handler that throws. - Fixed
pcntl_setcpuaffinity()error message advertising the cpu count as the inclusive upper bound. - Fixed
pcntl_setqos_class()requiring its optional$qos_classargument. - Fixed bug GH-23986 (/proc/self paths resolve to the parent process after
pcntl_fork()).
PDO
- Fixed
PDOStatement::getColumnMeta()reading out of bounds for an invalid column index. - Fixed
PDOStatement::bindColumn()registering a binding for a column name that is not in the result set. - Fixed
PDOStatement::execute()leaving the previous result available after a failed execution. - Fixed a use-after-free when bindValue()/execute()/closeCursor() is called from a bound parameter's
__toString()during execute(). - Fixed bug GH-23962 (Destroying a persistent PDO instance rolls back a transaction still in use by another instance).
- Fixed
PDO::setAttribute()installing aPDO::ATTR_STATEMENT_CLASSclass whose constructor arguments it rejects. - Fixed
PDO::ATTR_STATEMENT_CLASSconstructor_args type errors reporting "array given" regardless of the value passed. - Fixed
PDOStatement::bindParam()and bindColumn() leaking the driver options value. - Fixed PDOStatement not reporting its bound parameters and columns to the cycle collector.
- Fixed
PDOStatement::setFetchMode()not applying changes atomically.
PDO_DBLIB
- Fixed bug GH-23741 (segfault after a failed query inside a PDO transaction). Errors raised by beginTransaction(),
commit(), rollBack() and lastInsertId() are now reported instead of being dropped.
PDO_Firebird
- Fixed bug GH-23758 (PDO_Firebird returns null for non-null empty BLOBs).
Readline
- Fixed a heap over-read in the interactive shell prompt when cli.prompt is set to an empty string.
Session
- Fixed
session_start()continuing after a failedcreate_sid()when session.use_strict_mode rejects the supplied ID. - Fixed exceptions from user-defined
create_sid()handlers being replaced by return-value validation errors.
SimpleXML
- Fixed reconstructing a SimpleXMLElement freeing a child element that another variable still references.
SOAP
- Fixed bug GH-22895 (Heap use-after-free while encoding a Traversable with an illegal key).
- Fixed memory leak when
load_wsdl_ex()failed to load.
Sockets
- Fixed
socket_select()silently truncating sets larger than FD_SETSIZE on Windows.
SPL
- Fixed
SplFixedArray::setSize()doing nothing on subclasses whose constructor does not callparent::__construct(). - Fixed memory leak when
__construct(),__wakeup()or__unserialize()is called from an element destructor during setSize(0).
SQLite
- Fixed a crash when
SQLite3::close()is called from a userland callback.
Standard
- Fixed
sha1_file()returning a digest for incomplete data after a stream read failure. - Fixed
iptcembed()corrupting JPEG headers when called recursively from an output handler. - Fixed
proc_open()leaking descriptor zero when descriptor setup fails. - Fixed three Windows-only
proc_open()defects: an uninitialized PROCESS_INFORMATION, an indeterminate comspec pointer after a failed lookup, and an unchecked CreateFileA() failure. - Fix persistent stream context lifetime during shutdown
- Fix
wordwrap()ignoring an existing break at the end of the string - Fixed convert.quoted-printable-decode decoding lowercase hex digits to the wrong byte.
- Fixed
unserialize()of enums sharing its state with theunserialize()calls made by autoloaders.
Tidy
- Fixed a use-after-free when a tidyNode is used after its document is reparsed.
XSL
- Fixed bug GH-23730 (use-after-free when
XSLTProcessor::importStylesheet()is called during a transformation).
Zip
- Fixed
ZipArchive::extractTo()ignoring files given in a non-list array. - Fixed bug GH-23747 (
ZipArchive::close()use-after-free from a progress or cancel callback).
Commit List
Alexandre Daubois
- lexbor: Merge upstream memory safety fixes 8a14bc0 and f67ce4b in 5982cdace6
- Fix GHSA-62xp-839h-2637: FastCGI allowed_clients compared only 96 bits of IPv6 addresses in dcdfcf86fc
- Fix GHSA-fpwc-w8rq-cr92: strip credentials from user headers on cross-origin redirects in 5af9465ca8
- Fix GHSA-rgrp-mwpx-f6rm: unbounded recursion in
ext/soapXML parsing and decoding in 3655b79c7b
Arnaud Le Blanc
- Fix GH-21999: GC inconsistency after lazy object properties ht is added to roots in GH-22013
- Avoid state corruption via bailout in 506e87fa7d
Calvin Buckley
- Update versions for PHP 8.4.27 in 500438163a
Daniel Scherzer
ext/gd: fix undefined behavior with GD2 images withINT_MAX-sized chunks in b8c63871c8- NEWS in 2e5bb79a92
ext/gd: fix undefined behavior with GIFs with problematic LZW compression data in 2cea4a358d- NEWS in c8d62b8a0b
ext/soap: fix leak whenload_wsdl_ex()fails to load in GH-24066
David Carlier
ext/zip:ZipArchive::extractTo()ignores files given in a non-list array in 214ed7eb93- Fix GH-23365:
DOMNode::insertBefore()drops the node used as its own reference in a7bdb8b53d ext/sockets:socket_select()silent set truncation on Windows in 2bca736479ext/xsl:XSLTProcessor::importStylesheet()use-after-free during a transformation in b55c619356ext/zip:ZipArchive::close()use-after-free from a progress or cancel callback in 132403de39- Fix GH-23729:
DOMXPath::__construct()use-after-free during an evaluation in a74f826ff2 - sapi/cli: Fix crash in the CLI server when a client is reset before being accepted in 83c59b8053
- Fix GH-23897: php:
function()assertion after failed registerPHPFunctions() in 6eb8d06b57 - Fix GH-23637: opcache inheritance cache entry published too early in 873a997d70
ext/soap:to_xml_array()heap use-after-free with illegal iterator keys in d044f28b80- Fix GH-24050:
gc_collect_white()frees data reachable from a resurrected object in 7b75d71ca3
Derick Rethans
- Updated to version 2026.4 (2026d) in da9a926984
- Updated to version 2026.5 (2026e) in 5e06b3c681
geeknik
- Fix heap-buffer-overflow in convert stream filters with NUL in line-break-chars in b4e3397ec8
Georgij Tsarin
- Fix sparse set allocation size overflow in GH-23482
Ilia Alshanetsky
- dom: clear the xpath callback registrations before freeing them in 21e2c56aa4
ext/intl: Preserve PHP-side state when cloning formatters in 0f20be3867ext/pdo: Bound-check column index in getColumnMeta() in 4e26dd0f79- ext/sqlite3: reject
close()from inside a callback in 7300fa520d - dom: fix attribute namespaces from foreign content in the HTML parser in 92b08946a3
- Fix GHSA-ch8v-r6jh-4vvr: encode 0xFF in
FILTER_SANITIZE_ENCODEDin 7ac9700d0d - [http] Fix out-of-bounds read on empty Location header in 547566f17a
- Fix heap over-read in
cli_get_prompt()for empty cli.prompt in c2c01aea6c - Fix three Win32-only defects in
proc_opendescriptor handling in 8d0d6307aa - Fix GH-23693: JIT guard branches on stale flags across basic blocks in 9c2acc343e
- Zend: release the trampoline when
zend_call_function()bails early in d19c413d48 ext/pdo: Do not register a bindColumn() binding for an unknown column in 3580bbd28bext/intl: Reject unconstructed Collator in attribute and strength methods in 630128392bext/session: Abort strict-mode re-creation whencreate_sid()fails in 4868dd4e02ext/session: Preserve exceptions thrown bycreate_sid()in eacd1576adext/ffi: Hold a reference to the callable of an FFI callback in ed60b9edeb- Zend: clear the AVX bit in ECX when the OS has not enabled AVX state in eb32f52f77
ext/openssl: Restore blocking mode after a handshake timeout in ae429f100bext/pdo: Keep statement class when ATTR_STATEMENT_CLASS is rejected in beee995c90ext/pdo: Release driver options after bindParam and bindColumn in 22237f2c07- Fix GH-23741: pdo_dblib use-after-free of statement error state in 2dc6626007
ext/libxml: Keep SimpleXML children alive across reconstruction in efb8ad276dext/bcmath: Clear the sign of BcMath\Number results that truncate to zero in 8184e9efecext/tidy: Reject tidyNode use after the document is reparsed in 30ba0217d1- sapi/cli: Fix built-in server truncating responses after a partial write in 021acbe980
ext/pdo: Drop the previous result whenexecute()fails in 11690db178- Fix HashTable UAF when rebound from a parameter
__toString()in 08a49a9225 - Zend: Skip frameless registration for temporary modules in 75d77cb4fe
ext/pdo: Report bound params and columns to GC in 71e56ed7a9ext/pdo: MakePDOStatement::setFetchMode()updates atomic in 357fcf12f4ext/mysqlnd: Fix VIO plugin area getter in a1e5424af2- TSRM: Fix Windows shared memory payload offset in e50b8b05be
- Zend: Restart the va_list per callback in
zend_llist_apply_with_arguments()in fc3a76a603 - Zend: Include frameless functions in the system id in 1bffb94a2f
ext/standard: Reject incomplete sha1_file reads in 808685f576ext/standard: Keep IPTC headers local to each call in 0c4e3b6295ext/standard: Close ownedproc_opendescriptors on setup failure in 81e0367dbcext/dom: Restore the XPath context after a reentrant evaluation in 523127fd54ext/intl: Use byte offsets in IntlDateFormatter parsing in 913e01c159ext/pdo: Return false fromrewrite_name_to_position()on IM001 error in 073095ed8dext/standard: Fix convert.quoted-printable-decode of lowercase hex in 09c3e734b1- Fix alternate form flag for %x testing stale signed value in ee0f3c5315
Ilija Tovilo
-
if out
zend_class_constants_are_updated()in release builds in fa7734f43f - Skip result type inference verification for simple get in 3401483083
- Re-generate outdated
parse_date.cfile in aaa870786c - Add NEWS entry in 2f966f79f6
Jakub Skopal
- Fix GH-23764: Built-in server leaks fd on HEAD request for static file in abdcfc38b4
Jakub Zelenka
- Fix GHSA-vvx9-73fr-5jjx: do not fall back to CN if the cert has a service ID in 0bb308eb4c
- Fix GHSA-xr7j-rvgx-xq5p: OOB read in
php_openssl_matches_wildcard_name()in 78cc82b37a - Fix GHSA-r6x9-5r99-36j7: Various packet overreads in mysqlnd wireprotocol in 114dbb7436
- Fix GHSA-j3wh-g957-2m85: phar tar entry injection in 0994e2e887
- Add NEWS entries in a14181c944
ext/soap: make GHSA-cj93-vc83-wgqv test lean and reliable in 3aedde06bc- Skip bz2 GH-20807 test when less than 13 GiB of memory is available in 7d4f779ee9
- Zend tests: skip
syslog()in the arginfo/zpp mismatch test in 32f514962a - Fix TLS stream EOF detection after close_notify with stale errno in GH-24132
- Fix
bzopen()ownership of the stream it wraps in 291252d45f
Jordi Kroon
ext/standard: Fix 1-char relative Location redirects after GH-23467 in 64664758cd
jvoisin
- Backport: reject XML handler changes while parsing in GH-23818
- Backport: reject cURL callback changes from callbacks in GH-23814
- Backport: fix integer overflow in to_xml_hexbin in GH-23771
- Backport: fix integer overflow in mhash_keygen_s2k in GH-23770
Kamil Tekiela
- Fix GH-22854 (Assertion failure at link_errno_read in
ext/mysqli/mysqli_prop.c) in GH-20117 - Reset field_count for OK packet in GH-23890
- Fix memory leak when closing a statement on a killed connection in 9a3f37872b
lacatoire
ext/pcntl: fix an off by one bound and a parameter the parser made required in e23dc68f11
lazerg
- Fix GH-23106:
mb_strpos()overreads truncated UTF-8 haystacks in GH-23107 - Fix GH-23758: PDO_Firebird returns null for empty BLOBs in GH-23763
- Fix GH-23842: skipLazyInitialization() copies unresolved constant defaults in e0eea65aa4
- Fix GH-23896: Assertion failure in
zend_call_function()after a throwing deprecation in a2cdb89100
Lazizbek Ergashev
- Fix GH-23962: Don't roll back a persistent PDO handle still in use in GH-23963
- Fix GH-23986: Clear the realpath cache in the child after
pcntl_fork()in GH-23987 - Fix GH-24006: Skip
gh18431.phptwhen libzip lacks progress callbacks in GH-24009 - Fix GH-24063: SCCP merges 0.0 and -0.0 into a single constant in GH-24064
Levi Morrison
- Fix persistent stream context lifetime during shutdown in GH-23853
Marc
- fix windows ci: w11 no longer treats names like NUL.txt as reserved in GH-23844
Marc Bennewitz
- Fix GH-23811: SplFixedArray leak on re-init and broken setSize() in 8723e6606a
Matteo Beccati
- CI updates after forking 8.6 in 5714009960
Michael Orlitzky
sapi/cli/tests/php_cli_server_ipv6_error_message.phpt: useTEST_PHP_vars in 17506567b9ext/soap/tests/bugs/bug62900.phpt: make use ofTEST_PHP_vars in e216cf64f0
Mrmaxmeier
- Fix call_stack buffer overflow in
zend_analyze_calls()in 342a7465b3
ndossche
- Fix OSS-Fuzz #546798343: Heap-buffer-overflow in
zend_delete_call_instructionswith callable conversion in 3213c3faa6 - Fix GH-23619:
ext/ftp: cryptic error on servers that don't support TLS session resumption on data connection in d841b499b8 - Fix OSS-Fuzz #5674034779193344: Read of uninitialized memory in
is_cacheable_stream_path()in c7ffb825aa - Fix OSS-Fuzz #536440507: Immutable class incorrect assertion in c4efd20931
- Fix incorrect DCE due to unsound escape analysis in cba864da35
- Fix
__issetescape analysis causing misoptimization in f9639b562a - Fix property hook escape analysis causing misoptimization in 4bf483fa88
- NEWS in 3b3f5dd120
- Fix GH-23980:
ZEND_ASSERTviolation @ZEND_INCLUDE_OR_EVAL(include/eval run with a pending exception) in e7b225697e - Fix GH-23991: JIT generates invalid IR for multiple recursive calls in 6abb600217
- Fix SCCP evaluation of isset()/
empty()on dimension of non-escaping object in 423529d2b7
Nicolas Grekas
ext/pcntl: do not drop queued signals when an exception is pending in GH-23624ext/mbstring: Don't emit surrogates when encoding to UTF-8 in 0cf8668eb2- Rethrow exceptions from destructors called by the GC in a fiber in GH-24118
- Fix
wordwrap()ignoring an existing break at the end of the string in GH-24116
Nora Dossche
- Fix GHSA-cj93-vc83-wgqv in b11bd1d939
Pratik Bhujel
- Fix GH-11662: Skip multicast test when unavailable in a1a7bd4b8b
Shivam Mathur
- Avoid closing libxml output encoder twice in GH-23678
- Fix GHSA-9f67-6fw4-hpfp in f785c3f6ce
- Update PHP SDK to 2.8.4 in GH-23858
- Backport fixes for macOS 26 in GH-24031
- Upgrade macos in CI. in GH-24032
- Preserve bare NUL access with
open_basediron Windows in GH-24158 - Pin macOS CI to OpenSSL 3 in GH-24332
tianfenghan
- Fix GH-22567 (Windows ZTS CLI SAPI should refresh its TSRMLS cache during request activation) in 4e64a2655e
Weilin Du
- Zend: Fix iterator relocation at the current element during rehash in GH-23607
- Revert Zend: Fix iterator relocation at the current element during rehash in 8.4 and 8.5 in 293f22e5ec
ext/curl: Preserve callback lifetime without rejecting callback changes in GH-23863- CI: Fix flacky ext\curl\tests`curl_setopt_ssl.phpt` in GH-23944
ext/intl: Fixgrapheme_strstr()andgrapheme_stristr()match offsets after supplementary characters in GH-24012ext/intl: Fixgrapheme_strstr()andgrapheme_strpos()missing canonically equivalent matches in GH-24029ext/intl: Fix overlapping grapheme matches with negative search offsets in GH-24028