Release Information
- Release Type
- Bug Fix Release
- Release Status
- QA Release
- Branch Status
- Upcoming Release
PHP 8.4 is a development version, and is not recommended for production use. PHP 8.4 is scheduled to reach General Availability on 2024-11-21.
PHP 8.4.0RC2 is the latest QA release in PHP 8.4.
Downloads
Source Code
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.4.0alpha1
./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.4.0alpha1-cli-alpine
docker pull php:8.4.0alpha1-cli
docker pull php:8.4.0alpha1-fpm-alpine
docker pull php:8.4.0alpha1-apache
docker pull php:8.4.0alpha1-fpm
ChangeLog
BCMath
- [RFC] Add bcfloor, bcceil and bcround to BCMath.
- Improve performance.
Core
- Added
zend_call_stack_get
implementation for NetBSD, DragonFlyBSD, Solaris and Haiku. - Enabled ifunc checks on FreeBSD from the 12.x releases.
- Changed the type of
PHP_DEBUG
andPHP_ZTS
constants to bool. - Fixed bug GH-13142 (Undefined variable name is shortened when contains \0).
- Fixed bug GH-13178 (Iterator positions incorrect when converting packed array to hashed).
- Fixed zend fiber build for solaris default mode (32 bits).
- Fixed zend call stack size for macOs/arm64.
- Added support for Zend Max Execution Timers on FreeBSD.
- Ensure fiber stack is not backed by THP.
- Implement GH-13609 (Dump wrapped object in WeakReference class).
- Added sparc64 arch assembly support for zend fiber.
- Fixed GH-13581 no space available for TLS on NetBSD.
- Added fiber Sys-V loongarch64 support.
- Adjusted closure names to include the parent function's name.
- Improve randomness of uploaded file names and files created by tempnam().
- Added gc and shutdown callbacks to
zend_mm
custom handlers. - Fixed bug GH-14650 (Compute the size of pages before allocating memory).
- Fixed bug GH-11928 (The
--enable-re
2c-cgoto doesn't add the -g flag). - Added the #[\Deprecated] attribute.
- Fixed GH-11389 (Allow suspending fibers in destructors).
Curl
- Deprecated the CURLOPT_BINARYTRANSFER constant.
- Bumped required libcurl version to 7.61.0.
- Added feature_list key to the
curl_version()
return value.
Date
- Added DateTime[Immutable]::createFromTimestamp.
- Added DateTime[Immutable]::[get|set]Microsecond.
DOM
- Added
DOMNode::compareDocumentPosition()
. - Implement #53655 (Improve speed of DOMNode::C14N() on large XML documents).
- Fix cloning attribute with namespace disappearing namespace.
- Implement DOM HTML5 parsing and serialization RFC.
- Fix DOMElement->prefix with empty string creates bogus prefix.
- Handle OOM more consistently.
- Implemented "Improve callbacks in
ext/dom
andext/xsl
" RFC. - Added
DOMXPath::quote()
static method. - Implemented opt-in
ext/dom
spec compliance RFC. - Fixed bug #79701 (getElementById does not correctly work with duplicate definitions).
- Implemented "New ext-dom features in PHP 8.4" RFC.
- Fixed GH-14698 (segfault on DOM node dereference).
Fileinfo
- Update to libmagic 5.45.
- Fixed bug #65106 (PHP fails to compile
ext/fileinfo
).
FPM
- Implement GH-12385 (flush headers without body when calling
flush()
). - Added DragonFlyBSD system to the list which set FPM_BACKLOG_DEFAULT to SOMAXCONN.
FTP
- Removed the deprecated inet_ntoa call support.
- Fixed bug #63937 (Upload speed 10 times slower with PHP).
GD
- Fix parameter numbers and missing alpha check for imagecolorset().
- imagepng/imagejpeg/imagewep/imageavif now throw an exception on invalid quality parameter.
Gettext
- bind_textdomain_codeset, textdomain and d(*)gettext functions now throw an exception on empty domain.
Hash
- Changed return type of
hash_update()
to true. - Added HashContext::__debugInfo().
IMAP
- Moved to PECL.
Intl
- Added
IntlDateFormatter::PATTERN
constant. - Fixed Numberformatter::__construct when the locale is invalid, now throws an exception.
- Added
NumberFormatter::ROUND_TOWARD_ZERO
and ::ROUND_AWAY_FROM_ZERO as aliases for ::ROUND_DOWN and ::ROUND_UP. - Added
NumberFormatter::ROUND_HALFODD
. - Added PROPERTY_IDS_UNARY_OPERATOR, PROPERTY_ID_COMPAT_MATH_START and PROPERTY_ID_COMPAT_MATH_CONTINUE constants.
- Added IntlDateFormatter::getIanaID/intltz_get_iana_id method/function.
- Set to C++17 standard for icu 74 and onwards.
resourcebundle_get()
,ResourceBundle::get()
, and accessing offsets on a ResourceBundle object now throw: - TypeError for invalid offset types - ValueError for an empty string - ValueError if the integer index does not fit in a signed 32 bit integerResourceBundle::get()
now has a tentative return type of: ResourceBundle|array|string|int|null- Added the new Grapheme function grapheme_str_split.
- Added
IntlDateFormatter::parseToCalendar
.
LDAP
- Added LDAP_OPT_X_TLS_PROTOCOL_MAX/LDAP_OPT_X_TLS_PROTOCOL_TLS1_3 constants.
LibXML
- Added LIBXML_RECOVER constant.
libxml_set_streams_context()
now throws immediately on an invalid context instead of at the use-site.
MBString
- Added
mb_trim
,mb_ltrim
andmb_rtrim
. - Added
mb_ucfirst
andmb_lcfirst
. - Updated Unicode data tables to Unicode 15.1.
MySQLnd
- Fixed bug GH-13440 (PDO quote bottleneck).
- Fixed bug GH-10599 (Apache crash on Windows when using a self-referencing anonymous function inside a class with an active mysqli connection).
Opcache
- Added large shared segments support for FreeBSD.
- If JIT is enabled, PHP will now exit with a fatal error on startup in case of JIT startup initialization issues.
- Increased the maximum value of opcache.interned_strings_buffer to 32767 on 64bit archs.
- Fixed bug GH-13834 (Applying non-zero offset 36 to null pointer in
zend_jit.c
). - Fixed bug GH-14361 (Deep recursion in
zend_cfg.c
causes segfault).
OpenSSL
- Fixed bug #80269 (OpenSSL sets Subject wrong with extraattribs parameter).
- Implement request #48520 (openssl_csr_new - allow multiple values in DN).
- Introduced new serial_hex parameter to openssl_csr_sign.
- Added X509_PURPOSE_OCSP_HELPER and X509_PURPOSE_TIMESTAMP_SIGN constants.
- Bumped minimum required OpenSSL version to 1.1.1.
- Added compile-time option
--with-openssl-legacy-provider
to enable legacy provider. - Added support for Curve25519 + Curve448 based keys.
- Fixed bug GH-13343 (openssl_x509_parse should not allow omitted seconds in UTCTimes).
Output
- Clear output handler status flags during handler initialization.
- Fixed bug with
url_rewriter.h
osts not used byoutput_add_rewrite_var()
.
PCNTL
- Added pcntl_setns for Linux.
- Added pcntl_getcpuaffinity/pcntl_setcpuaffinity.
- Updated pcntl_get_signal_handler signal id upper limit to be more in line with platforms limits.
- Added pcntl_getcpu for Linux/FreeBSD/Solaris/Illumos.
- Added pcntl_getqos_class/pcntl_setqos_class for macOs.
- Added SIGCKPT/SIGCKPTEXIT constants for DragonFlyBSD.
- Added FreeBSD's SIGTRAP handling to pcntl_siginfo_to_zval.
- Added POSIX pcntl_waitid.
PCRE
- Upgrade bundled pcre2lib to version 10.43.
- Add "/r" modifier.
- Upgrade bundled pcre2lib to version 10.44.
PDO
- Fixed setAttribute and getAttribute.
- Implemented PDO driver-specific subclasses RFC.
- Added support for PDO driver-specific SQL parsers.
PDO_DBLIB
- Fixed setAttribute and getAttribute.
- Added class Pdo\DbLib.
PDO_FIREBIRD
- Fixed setAttribute and getAttribute.
- Feature: Add transaction isolation level and mode settings to pdo_firebird.
- Added class Pdo\Firebird.
PDO_MYSQL
- Fixed setAttribute and getAttribute.
- Added class Pdo\Mysql.
- Added custom SQL parser.
PDO_ODBC
- Added class Pdo\Odbc.
PDO_PGSQL
- Fixed GH-12423, DSN credentials being prioritized over the user/password PDO constructor arguments.
- Fixed native float support with pdo_pgsql query results.
- Added class Pdo\Pgsql.
- Retrieve the memory usage of the query result resource.
- Added Pdo`Pgsql::setNoticeCallBack` method to receive DB notices.
- Added custom SQL parser.
PDO_SQLITE
- Added class Pdo\Sqlite.
- Fixed bug #81227 (
PDO::inTransaction
reports false when in transaction). - Added custom SQL parser.
PGSQL
- Added the possibility to have no conditions for pg_select.
- Persistent connections support the PGSQL_CONNECT_FORCE_RENEW flag.
- Added pg_result_memory_size to get the query result memory usage.
- Added pg_change_password to alter an user's password.
- Added pg_put_copy_data/pg_put_copy_end to send COPY commands and signal the end of the COPY.
- Added pg_socket_poll to poll on the connection.
- Added pg_jit to get infos on server JIT support.
- Added pg_set_chunked_rows_size to fetch results per chunk.
Phar
- Fixed bug GH-12532 (PharData created from zip has incorrect timestamp).
POSIX
- Added POSIX_SC_CHILD_MAX and POSIX_SC_CLK_TCK constants.
- Updated posix_isatty to set the error number on file descriptors.
PSpell
- Moved to PECL.
Reflection
- Implement GH-12908 (Show attribute name/class in ReflectionAttribute dump).
- Make
ReflectionGenerator::getFunction()
legal after generator termination. - Added
ReflectionGenerator::isClosed()
.
SimpleXML
- Fixed bug GH-12192 (SimpleXML infinite loop when getName() is called within foreach).
- Fixed bug GH-12208 (SimpleXML infinite loop when a cast is used inside a foreach).
- Fixed bug #55098 (SimpleXML iteration produces infinite loop).
- Fix signature of
simplexml_import_dom()
.
Sockets
- Added multicast group support for ipv4 on FreeBSD. (jonathan@
tangential.c
a) - Added the TCP_SYNCNT constant for Linux to set number of attempts to send SYN packets from the client.
- Added the SO_EXCLBIND constant for exclusive socket binding on illumos/solaris.
- Updated the socket_create_listen backlog argument default value to SOMAXCONN.
- Added the SO_NOSIGPIPE constant to control the generation of SIGPIPE for macOs and FreeBSD.
- Added SO_LINGER_SEC for macOs, true equivalent of SO_LINGER in other platforms.
- Add close-on-exec on socket created with socket_accept on unixes.
- Removed the deprecated inet_ntoa call support.
- Added the SO_EXECLUSIVEADDRUSE windows constant.
- Added the SOCK_CONN_DGRAM/SOCK_DCCP netbsd constants.
SNMP
- Removed the deprecated inet_ntoa call support.
SOAP
- Add support for clark notation for namespaces in class map.
- Mitigate #51561 (SoapServer with a extented class and using sessions, lost the setPersistence()).
- Fixed bug #49278 (SoapClient::__getLastResponseHeaders returns NULL if wsdl operation !has output).
- Fixed bug #44383 (PHP DateTime not converted to xsd:datetime).
- Fixed bug GH-11941 (soap with session persistence will silently fail when "session" built as a shared object).
Sodium
- Add support for AEGIS-128L and AEGIS-256.
- Enable AES-GCM on aarch64 with the ARM crypto extensions.
SPL
- Implement SeekableIterator for SplObjectStorage.
Standard
- Implement GH-12188 (Indication for the int size in
phpinfo()
). - Partly fix GH-12143 (Incorrect
round()
result for 0.49999999). - Fix GH-12252 (
round()
: Validate the rounding mode). - Increase the default BCrypt cost to 12.
- Fixed bug GH-12592 (
strcspn()
odd behaviour with NUL bytes and empty mask). - Removed the deprecated inet_ntoa call support.
- Cast large floats that are within int range to int in number_format so the precision is not lost.
- Add support for 4 new rounding modes to the
round()
function. debug_zval_dump()
now indicates whether an array is packed.- Fix GH-12143 (Optimize round).
- Changed return type of long2ip to string from string|false.
- Fix GH-12143 (Extend the maximum precision round can handle by one digit).
- Added the
http_get_last_response_headers()
andhttp_clear_last_response_headers()
that allows retrieving the same content as the magic $http_response_header variable. - Add
php_base64_encode_ex()
API. - Implemented "Raising zero to the power of negative number" RFC.
- Added
array_find()
,array_find_key()
,array_all()
, andarray_any()
.
XML
- Added XML_OPTION_PARSE_HUGE parser option.
XMLReader
- Declares class constant types.
- Add
XMLReader::fromStream()
,XMLReader::fromUri()
,XMLReader::fromString()
.
XMLWriter
- Add
XMLWriter::toStream()
,XMLWriter::toUri()
,XMLWriter::toMemory()
.
XSL
- Implement request #64137 (
XSLTProcessor::setParameter()
should allow both quotes to be used). - Implemented "Improve callbacks in
ext/dom
andext/xsl
" RFC. - Added XSLTProcessor::$maxTemplateDepth and XSLTProcessor::$maxTemplateVars.