diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2318f896b7a..a9f34c239c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -350,7 +350,8 @@ Currently, we have the following branches in use: | Branch | | | --------- | --------- | -| master | Active development branch for PHP 8.4, which is open for backwards incompatible changes and major internal API changes. | +| master | Active development branch for PHP 8.5, which is open for backwards incompatible changes and major internal API changes. | +| PHP-8.4 | Is used to release the PHP 8.4.x series. This is a current stable version and is open for bugfixes only. | | PHP-8.3 | Is used to release the PHP 8.3.x series. This is a current stable version and is open for bugfixes only. | | PHP-8.2 | Is used to release the PHP 8.2.x series. This is a current stable version and is open for bugfixes only. | | PHP-8.1 | Is used to release the PHP 8.1.x series. This is an old stable version and is open for security fixes only. | diff --git a/NEWS b/NEWS index 92c50d03d13..39c3aba66fb 100644 --- a/NEWS +++ b/NEWS @@ -1,804 +1,5 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.4.0RC1 - -- BcMath: - . bcpow() performance improvement. (Jorg Sowa) - . ext/bcmath: Check for scale overflow. (SakiTakamachi) - . [RFC] ext/bcmath: Added bcdivmod. (SakiTakamachi) - . Fix GH-15968 (Avoid converting objects to strings in operator calculations). - (SakiTakamachi) - -- Curl: - . Added CURLOPT_DEBUGFUNCTION as a Curl option. (Ayesh Karunaratne) - -- Debugging: - . Fixed bug GH-15923 (GDB: Python Exception : - exceptions must derive from BaseException). (nielsdos) - -- DOM: - . Fix XML serializer errata: xmlns="" serialization should be allowed. - (nielsdos) - . Fixed bug GH-15910 (Assertion failure in ext/dom/element.c). (nielsdos) - . Fix unsetting DOM properties. (nielsdos) - -- MBString: - . Fixed bug GH-15824 (mb_detect_encoding(): Argument $encodings contains - invalid encoding "UTF8"). (Yuya Hamada) - . Updated Unicode data tables to Unicode 16.0. (Ayesh Karunaratne) - -- Opcache: - . Fixed bug GH-15657 (Segmentation fault in dasm_x86.h). (nielsdos) - . Added opcache_jit_blacklist() function. (Bob) - -- PHPDBG: - . Fixed bug GH-15901 (phpdbg: Assertion failure on i funcs). (cmb) - -- PCRE: - . Fix UAF issues with PCRE after request shutdown. (nielsdos) - -- PDO_PGSQL: - . Fixed GH-15986 (Double-free due to Pdo\Pgsql::setNoticeCallback()). (cmb, - nielsdos) - . Fixed GH-12940 (Using PQclosePrepared when available instead of - the DEALLOCATE command to free statements resources). (David Carlier) - -- Reflection: - . Add missing ReflectionProperty::hasHook[s]() methods. (ilutov) - . Add missing ReflectionProperty::isFinal() method. (ilutov) - -- SimpleXML: - . Fixed bug GH-15837 (Segmentation fault in ext/simplexml/simplexml.c). - (nielsdos) - -- SOAP: - . Fixed bug #73182 (PHP SOAPClient does not support stream context HTTP - headers in array form). (nielsdos) - . Fixed bug #62900 (Wrong namespace on xsd import error message). (nielsdos) - . Fixed bug GH-15711 (SoapClient can't convert BackedEnum to scalar value). - (nielsdos) - -- SPL: - . Fixed bug GH-15918 (Assertion failure in ext/spl/spl_fixedarray.c). - (nielsdos) - -- Standard: - . Add support for backed enums in http_build_query(). (ilutov) - . Fixed bug GH-15982 (Assertion failure with array_find when references are - involved). (nielsdos) - -- Streams: - . Fixed bugs GH-15908 and GH-15026 (leak / assertion failure in streams.c). - (nielsdos) - . Fixed bug GH-15980 (Signed integer overflow in main/streams/streams.c). - (cmb) - -- TSRM: - . Prevent closing of unrelated handles. (cmb) - -- Windows: - . Fixed minimal Windows version. (cmb) - -- Zip: - . Added ZipArchive::ER_TRUNCATED_ZIP added in libzip 1.11. (Remi) - -12 Sep 2024, PHP 8.4.0beta5 - -- BCMath: - . Fixed LONG_MAX in BCMath ext. (Saki Takamachi) - . Fixed bcdiv() div by one. (Saki Takamachi) - . [RFC] Support object types in BCMath. (Saki Takamachi) - -- Core: - . Fixed bug GH-15330 (Do not scan generator frames more than once). (Arnaud) - . Fixed bug GH-15644 (Asymmetric visibility doesn't work with hooks). (ilutov) - . Implemented lazy objects RFC. (Arnaud) - . Fixed bug GH-15686 (Building shared iconv with external iconv library). - (Peter Kokot, zeriyoshi) - . Fixed missing error when adding asymmetric visibility to unilateral virtual - property. (ilutov) - . Fixed bug GH-15693 (Unnecessary include in main.c bloats binary). - (nielsdos) - . Fixed bug GH-15731 (AllowDynamicProperties validation should error on - enums). (DanielEScherzer) - . Fixed uninitialized lineno in constant AST of internal enums. (ilutov) - -- Curl: - . The CURLOPT_DNS_USE_GLOBAL_CACHE option is now silently ignored. (Ayesh Karunaratne) - -- DOM: - . Fixed bug GH-13988 (Storing DOMElement consume 4 times more memory in - PHP 8.1 than in PHP 8.0). (nielsdos) - . Fixed bug GH-15654 (Signed integer overflow in ext/dom/nodelist.c). - (nielsdos) - -- GD: - . Added gdImageClone to bundled libgd. (David Carlier) - -- Hash: - . Fixed bug GH-15742 (php_hash_sha.h incompatible with C++). (cmb) - -- OpenSSL: - . Implement GH-13514 PASSWORD_ARGON2 from OpenSSL 3.2. (Remi) - -- PDO: - . The internal header php_pdo_int.h is no longer installed; it is not - supposed to be used by PDO drivers. (cmb) - -- PDO_Firebird: - . Fixed GH-15604 (Always make input parameters nullable). (sim1984) - -- Reflection: - . Fixed bug GH-15718 (Segfault on ReflectionProperty::get{Hook,Hooks}() on - dynamic properties). (DanielEScherzer) - . Fixed bug GH-15694 (ReflectionProperty::isInitialized() is incorrect for - hooked properties). (ilutov) - -- SOAP: - . Fixed bug #61525 (SOAP functions require at least one space after HTTP - header colon). (nielsdos) - . Implement request #47317 (SoapServer::__getLastResponse()). (nielsdos) - -- Standard: - . Fixed bug GH-15552 (Signed integer overflow in ext/standard/scanf.c). (cmb) - . Implemented GH-15685 (improve proc_open error reporting on Windows). (cmb) - -- Streams: - . Fixed bug GH-15628 (php_stream_memory_get_buffer() not zero-terminated). - (cmb) - -29 Aug 2024, PHP 8.4.0beta4 - -- Core: - . Fixed bug GH-15408 (MSan false-positve on zend_max_execution_timer). - (zeriyoshi) - . Fixed bug GH-15438 (Hooks on constructor promoted properties without - visibility are ignored). (ilutov) - . Fixed bug GH-15419 (Missing readonly+hook incompatibility check for readonly - classes). (ilutov) - . Fixed bug GH-15187 (Various hooked object iterator issues). (ilutov) - . Fixed bug GH-15456 (Crash in get_class_vars() on virtual properties). - (ilutov) - . Fixed bug GH-15501 (Windows HAVE_
_H macros defined to 1 or - undefined). (Peter Kokot) - . Fixed bug GH-15565 (--disable-ipv6 during compilation produces error - EAI_SYSTEM not found). (nielsdos) - . Implemented asymmetric visibility for properties. (ilutov) - -- Curl: - . Added CURLOPT_PREREQFUNCTION Curl option to set a custom callback - after the connection is established, but before the request is - performed. (Ayesh Karunaratne) - . Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as - CURLOPT_FTP_RESPONSE_TIMEOUT. (Ayesh Karunaratne) - -- Date: - . Fixed bug GH-13773 (DatePeriod not taking into account microseconds for end - date). (Mark Bennewitz, Derick) - -- DOM: - . Fixed bug GH-15551 (Segmentation fault (access null pointer) in - ext/dom/xml_common.h). (nielsdos) - . Fixed bug GH-15570 (Segmentation fault (access null pointer) in - ext/dom/html5_serializer.c). (nielsdos) - -- FPM: - . Added memory peak to the scoreboard / status page. (Flávio Heleno) - -- MySQLnd: - . Fixed bug GH-15432 (Heap corruption when querying a vector). (cmb, - Kamil Tekiela) - -- Opcache: - . Fixed bug GH-15490 (Building of callgraph modifies preloaded symbols). - (ilutov) - . Fixed bug GH-15178 (Assertion in tracing JIT on hooks). (ilutov) - -- PDO_MYSQL: - . mysqlnd: support ER_CLIENT_INTERACTION_TIMEOUT. (Appla) - -- Session: - . Emit warnings for non-positive values of session.gc_divisor and negative values - of session.gc_probability. (Jorg Sowa) - -- Standard: - . The "allowed_classes" option for unserialize() now throws TypeErrors and - ValueErrors if it is not an array of class names. (Girgias) - -- Streams: - . Fixed bug GH-14930 (Custom stream wrapper dir_readdir output truncated to - 255 characters in PHP 8.3). (Joe Cai) - - -15 Aug 2024, PHP 8.4.0beta3 - -- Core: - . Exiting a namespace now clears seen symbols. (ilutov) - . The exit (and die) language constructs now behave more like a function. - They can be passed liked callables, are affected by the strict_types - declare statement, and now perform the usual type coercions instead of - casting any non-integer value to a string. - As such, passing invalid types to exit/die may now result in a TypeError - being thrown. (Girgias) - -- CURL: - . Added CURLOPT_TCP_KEEPCNT to set the number of probes to send before - dropping the connection. (David Carlier) - -- Hash: - . Fix GH-15384 (Build fails on Alpine / Musl for amd64). (timwolla) - -- Sockets: - . Added SO_BINDTOIFINDEX to bind a socket to an interface index. - (David Carlier) - -- Standard: - . php_uname() now throws ValueErrors on invalid inputs. (Girgias) - -15 Aug 2024, PHP 8.4.0beta1 - -- Core: - . Updated build system scripts config.guess to 2024-07-27 and config.sub to - 2024-05-27. (Peter Kokot) - . Fixed bug GH-15240 (Infinite recursion in trait hook). (ilutov) - . Fixed bug GH-15140 (Missing variance check for abstract set with asymmetric - type). (ilutov) - . Fixed bug GH-15181 (Disabled output handler is flushed again). (cmb) - . Passing E_USER_ERROR to trigger_error() is now deprecated. (Girgias) - . Fixed bug GH-15292 (Dynamic AVX detection is broken for MSVC). (nielsdos) - . Using "_" as a class name is now deprecated. (Girgias) - -- Curl: - . Added constants CURL_HTTP_VERSION_3 (libcurl 7.66) and CURL_HTTP_VERSION_3ONLY - (libcurl 7.88) as options for CURLOPT_HTTP_VERSION (Ayesh Karunaratne) - -- Date: - . Constants SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, and SUNFUNCS_RET_DOUBLE - are now deprecated. (Jorg Sowa) - -- DBA: - . Passing null or false to dba_key_split() is deprecated. (Grigias) - -- DOM: - . Fixed bug GH-15192 (Segmentation fault in dom extension - (html5_serializer)). (nielsdos) - . Deprecated DOM_PHP_ERR constant. (nielsdos) - . Removed DOMImplementation::getFeature(). (nielsdos) - . Fixed bug GH-15331 (Element::$substitutedNodeValue test failed). (nielsdos) - -- Hash: - . Deprecated passing incorrect data types for options to ext/hash functions. - (nielsdos) - . Added SSE2 and SHA-NI implementation of SHA-256. (timwolla, Colin Percival, - Graham Percival) - -- Mysqli: - . The mysqli_ping() function and mysqli::ping() method are now deprecated, - as the reconnect feature was removed in PHP 8.2. (Kamil Tekiela) - . The mysqli_kill() function and mysqli::kill() method are now deprecated. - If this functionality is needed a SQL "KILL" command can be used instead. - (Kamil Tekiela) - . The mysqli_refresh() function and mysqli::refresh() method are now deprecated. - If this functionality is needed a SQL "FLUSH" command can be used instead. - (Kamil Tekiela) - . Passing explicitly the $mode parameter to mysqli_store_result() has been - deprecated. As the MYSQLI_STORE_RESULT_COPY_DATA constant was only used in - conjunction with this function it has also been deprecated. (Girgias) - -- PDO_Firebird: - . Support proper formatting of time zone types. (sim1984) - -- PHPDBG: - . array out of bounds, stack overflow handled for segfault handler on windows. - (David Carlier) - -- Random: - . lcg_value() is now deprecated. (timwolla) - -- Readline: - . Fixed bug #51558 (Shared readline build fails). (Peter Kokot) - -- Session: - . INI settings session.sid_length and session.sid_bits_per_character are now - deprecated. (timwolla) - -- SOAP: - . Passing an int to SoapServer::addFunction() is now deprecated. - If all PHP functions need to be provided flatten the array returned by - get_defined_functions(). (Girgias) - . The SOAP_FUNCTIONS_ALL constant is now deprecated. (Girgias) - -- Sockets: - . Added IP_PORTRANGE* constants for BSD systems to control ephemeral port - ranges. (David Carlier) - . Added SOCK_NONBLOCK/SOCK_CLOEXEC constants for socket_create and - socket_create_pair to apply O_NONBLOCK/O_CLOEXEC flags to the - newly created sockets. (David Carlier) - -- SPL: - . The SplFixedArray::__wakeup() method has been deprecated as it implements - __serialize() and __unserialize() which need to be overwritten instead. - (TysonAndre) - . Passing a non-empty string for the $escape parameter of: - - SplFileObject::setCsvControl() - - SplFileObject::fputcsv() - - SplFileObject::fgetcsv() - is now deprecated. (Girgias) - -- Standard: - . Unserializing the uppercase 'S' tag is now deprecated. (timwolla) - . Enables crc32 auxiliary detection on OpenBSD. (David Carlier) - . Passing a non-empty string for the $escape parameter of: - - fputcsv() - - fgetcsv() - - str_getcsv() - is now deprecated. (Girgias) - . The str_getcsv() function now throws ValueErrors when the $separator and - $enclosure arguments are not one byte long, or if the $escape is not one - byte long or the empty string. This aligns the behaviour to be identical - to that of fputcsv() and fgetcsv(). (Girgias) - -- Streams: - . Implemented GH-15155 (Stream context is lost when custom stream wrapper is - being filtered). (Quentin Dreyer) - -- XML: - . The xml_set_object() function has been deprecated. (Girgias) - . Passing non-callable strings to the xml_set_*_handler() functions is now - deprecated. (Girgias) - -01 Aug 2024, PHP 8.4.0alpha4 - -- GMP: - . RFC: Change GMP bool cast behavior. (Saki Takamachi) - -01 Aug 2024, PHP 8.4.0alpha3 - -- Core: - . Fix GH-14978 (The xmlreader extension phpize build). (Peter Kokot) - . Throw Error exception when encountering recursion during comparison, rather - than fatal error. (ilutov) - . Added missing cstddef include for C++ builds. (cmb) - . Fixed bug GH-15108 (Segfault when destroying generator during shutdown). - (Arnaud) - . Fixed bug GH-15275 (Crash during GC of suspended generator delegate). - (Arnaud) - -- BCMath: - . Adjust bcround()'s $mode parameter to only accept the RoundingMode - enum. (timwolla, saki) - -- DOM: - . Fix trampoline leak in xpath callables. (nielsdos) - . Throw instead of silently failing when creating a too long text node in - (DOM)ParentNode and (DOM)ChildNode. (nielsdos) - -- FPM: - . /dev/poll events.mechanism for Solaris/Illumos setting had been retired. - (David Carlier) - -- GMP: - . The GMP class is now final and cannot be extended anymore. (Girgias) - -- Intl: - . Added SpoofChecker::setAllowedChars to set unicode chars ranges. - (David Carlier) - . Fixed bug GH-15087 (IntlChar::foldCase()'s $option is not optional). (cmb) - -- Opcache: - . Fixed bug GH-13775 (Memory leak possibly related to opcache SHM placement). - (Arnaud, nielsdos) - -- OpenSSL: - . Bumped minimum required OpenSSL version to 1.1.0. (cmb) - -- PDO_FIREBIRD: - . Added Pdo\Firebird::ATTR_API_VERSION. (SakiTakamachi) - . Added getApiVersion() and removed from getAttribute(). - (SakiTakamachi) - . Supported Firebird 4.0 datatypes. (sim1984) - -- PGSQL: - . pg_convert/pg_insert/pg_update/pg_delete ; regexes are now cached. - (David Carlier) - -- Random: - . Fixed bug GH-15094 (php_random_default_engine() is not C++ conforming). - (cmb) - -- Readline: - . Fixed readline_info, rl_line_buffer_length/rl_len globals on update. - (David Carlier) - -- Standard: - . Fix references in request_parse_body() options array. (nielsdos) - . Add RoundingMode enum. (timwolla, saki) - -- Tidy: - . Failures in the constructor now throw exceptions rather than emitting - warnings and having a broken object. (nielsdos) - . Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling(). - (nielsdos) - -- XMLReader: - . Fixed bug GH-15123 (var_dump doesn't actually work on XMLReader). - (nielsdos) - -- XSL: - . Fix trampoline leak in xpath callables. (nielsdos) - -18 Jul 2024, PHP 8.4.0alpha2 - -- Core: - . Fixed bug GH-14801 (Fix build for armv7). (andypost) - . Implemented property hooks RFC. (ilutov) - -- DOM: - . Improve support for template elements. (nielsdos) - -- GD: - . Check overflow/underflow for imagescale/imagefilter. (David Carlier) - -- LibXML: - . Added LIBXML_NO_XXE constant. (nielsdos) - -- Opcache: - . Fixed bug GH-14873 (PHP 8.4 min function fails on typed integer). - (nielsdos) - -- PDO: - . Fixed bug GH-14792 (Compilation failure on pdo_* extensions). - (Peter Kokot) - -- Standard: - . Change highlight_string() and print_r() return type to string|true. (Ayesh) - -- Windows: - . Update the icon of the Windows executables, e.g. php.exe. (Ayesh, - Nurudin Imširović) - -- XML: - . Fixed bug #81481 (xml_get_current_byte_index limited to 32-bit numbers on - 64-bit builds). (nielsdos) - -04 Jul 2024, PHP 8.4.0alpha1 - -- BCMath: - . [RFC] Add bcfloor, bcceil and bcround to BCMath. (Saki Takamachi) - . Improve performance. (Saki Takamachi, nielsdos) - -- Core: - . Added zend_call_stack_get implementation for NetBSD, DragonFlyBSD, - Solaris and Haiku. (David Carlier) - . Enabled ifunc checks on FreeBSD from the 12.x releases. (Freaky) - . Changed the type of PHP_DEBUG and PHP_ZTS constants to bool. (haszi) - . Fixed bug GH-13142 (Undefined variable name is shortened when contains \0). - (nielsdos) - . Fixed bug GH-13178 (Iterator positions incorrect when converting packed - array to hashed). (ilutov) - . Fixed zend fiber build for solaris default mode (32 bits). (David Carlier) - . Fixed zend call stack size for macOs/arm64. (David Carlier) - . Added support for Zend Max Execution Timers on FreeBSD. (Kévin Dunglas) - . Ensure fiber stack is not backed by THP. (crrodriguez) - . Implement GH-13609 (Dump wrapped object in WeakReference class). (nielsdos) - . Added sparc64 arch assembly support for zend fiber. (Claudio Jeker) - . Fixed GH-13581 no space available for TLS on NetBSD. (Paul Ripke) - . Added fiber Sys-V loongarch64 support. (qiangxuhui) - . Adjusted closure names to include the parent function's name. (timwolla) - . Improve randomness of uploaded file names and files created by tempnam(). - (Arnaud) - . Added gc and shutdown callbacks to zend_mm custom handlers. - (Florian Engelhardt) - . Fixed bug GH-14650 (Compute the size of pages before allocating memory). - (Julien Voisin) - . Fixed bug GH-11928 (The --enable-re2c-cgoto doesn't add the -g flag). - (Peter Kokot) - . Added the #[\Deprecated] attribute. (beberlei, timwolla) - . Fixed GH-11389 (Allow suspending fibers in destructors). (Arnaud, trowski) - -- Curl: - . Deprecated the CURLOPT_BINARYTRANSFER constant. (divinity76) - . Bumped required libcurl version to 7.61.0. (Ayesh) - . Added feature_list key to the curl_version() return value. (Ayesh) - -- Date: - . Added DateTime[Immutable]::createFromTimestamp. (Marc Bennewitz) - . Added DateTime[Immutable]::[get|set]Microsecond. (Marc Bennewitz) - -- DOM: - . Added DOMNode::compareDocumentPosition(). (nielsdos) - . Implement #53655 (Improve speed of DOMNode::C14N() on large XML documents). - (nielsdos) - . Fix cloning attribute with namespace disappearing namespace. (nielsdos) - . Implement DOM HTML5 parsing and serialization RFC. (nielsdos) - . Fix DOMElement->prefix with empty string creates bogus prefix. (nielsdos) - . Handle OOM more consistently. (nielsdos) - . Implemented "Improve callbacks in ext/dom and ext/xsl" RFC. (nielsdos) - . Added DOMXPath::quote() static method. (divinity76) - . Implemented opt-in ext/dom spec compliance RFC. (nielsdos) - . Fixed bug #79701 (getElementById does not correctly work with duplicate - definitions). (nielsdos) - . Implemented "New ext-dom features in PHP 8.4" RFC. (nielsdos) - . Fixed GH-14698 (segfault on DOM node dereference). (David Carlier) - -- Fileinfo: - . Update to libmagic 5.45. (nielsdos) - . Fixed bug #65106 (PHP fails to compile ext/fileinfo). (Guillaume Outters) - -- FPM: - . Implement GH-12385 (flush headers without body when calling flush()). - (nielsdos) - . Added DragonFlyBSD system to the list which set FPM_BACKLOG_DEFAULT - to SOMAXCONN. (David Carlier) - -- FTP: - . Removed the deprecated inet_ntoa call support. (David Carlier) - . Fixed bug #63937 (Upload speed 10 times slower with PHP). (nielsdos) - -- GD: - . Fix parameter numbers and missing alpha check for imagecolorset(). - (Giovanni Giacobbi) - . imagepng/imagejpeg/imagewep/imageavif now throw an exception on - invalid quality parameter. (David Carlier) - -- Gettext: - . bind_textdomain_codeset, textdomain and d(*)gettext functions - now throw an exception on empty domain. (David Carlier) - -- Hash: - . Changed return type of hash_update() to true. (nielsdos) - . Added HashContext::__debugInfo(). (timwolla) - -- IMAP: - . Moved to PECL. (Derick Rethans) - -- Intl: - . Added IntlDateFormatter::PATTERN constant. (David Carlier) - . Fixed Numberformatter::__construct when the locale is invalid, now - throws an exception. (David Carlier) - . Added NumberFormatter::ROUND_TOWARD_ZERO and ::ROUND_AWAY_FROM_ZERO as - aliases for ::ROUND_DOWN and ::ROUND_UP. (Jorg Sowa) - . Added NumberFormatter::ROUND_HALFODD. (Ayesh Karunaratne) - . Added PROPERTY_IDS_UNARY_OPERATOR, PROPERTY_ID_COMPAT_MATH_START and - PROPERTY_ID_COMPAT_MATH_CONTINUE constants. (David Carlier) - . Added IntlDateFormatter::getIanaID/intltz_get_iana_id method/function. - (David Carlier) - . Set to C++17 standard for icu 74 and onwards. (David Carlier) - . 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 integer - . ResourceBundle::get() now has a tentative return type of: - ResourceBundle|array|string|int|null - . Added the new Grapheme function grapheme_str_split. (youkidearitai) - . Added IntlDateFormatter::parseToCalendar. (David Carlier) - -- LDAP: - . Added LDAP_OPT_X_TLS_PROTOCOL_MAX/LDAP_OPT_X_TLS_PROTOCOL_TLS1_3 - constants. (StephenWall) - -- LibXML: - . Added LIBXML_RECOVER constant. (nielsdos) - . libxml_set_streams_context() now throws immediately on an invalid context - instead of at the use-site. (nielsdos) - -- MBString: - . Added mb_trim, mb_ltrim and mb_rtrim. (Yuya Hamada) - . Added mb_ucfirst and mb_lcfirst. (Yuya Hamada) - . Updated Unicode data tables to Unicode 15.1. (Ayesh Karunaratne) - -- MySQLnd: - . Fixed bug GH-13440 (PDO quote bottleneck). (nielsdos) - . Fixed bug GH-10599 (Apache crash on Windows when using a self-referencing - anonymous function inside a class with an active mysqli connection). - (nielsdos) - -- Opcache: - . Added large shared segments support for FreeBSD. (David Carlier) - . If JIT is enabled, PHP will now exit with a fatal error on startup in case - of JIT startup initialization issues. (danog) - . Increased the maximum value of opcache.interned_strings_buffer to 32767 on - 64bit archs. (Arnaud) - . Fixed bug GH-13834 (Applying non-zero offset 36 to null pointer in - zend_jit.c). (nielsdos) - . Fixed bug GH-14361 (Deep recursion in zend_cfg.c causes segfault). - (nielsdos) - -- OpenSSL: - . Fixed bug #80269 (OpenSSL sets Subject wrong with extraattribs parameter). - (Jakub Zelenka) - . Implement request #48520 (openssl_csr_new - allow multiple values in DN). - (Jakub Zelenka) - . Introduced new serial_hex parameter to openssl_csr_sign. (Jakub Zelenka, - Florian Sowade) - . Added X509_PURPOSE_OCSP_HELPER and X509_PURPOSE_TIMESTAMP_SIGN constants. - (Vincent Jardin) - . Bumped minimum required OpenSSL version to 1.1.1. (Ayesh Karunaratne) - . Added compile-time option --with-openssl-legacy-provider to enable legacy - provider. (Adam Saponara) - . Added support for Curve25519 + Curve448 based keys. (Manuel Mausz) - . Fixed bug GH-13343 (openssl_x509_parse should not allow omitted seconds in - UTCTimes). (Jakub Zelenka) - -- Output: - . Clear output handler status flags during handler initialization. (haszi) - . Fixed bug with url_rewriter.hosts not used by output_add_rewrite_var(). - (haszi) - -- PCNTL: - . Added pcntl_setns for Linux. (David Carlier) - . Added pcntl_getcpuaffinity/pcntl_setcpuaffinity. (David Carlier) - . Updated pcntl_get_signal_handler signal id upper limit to be - more in line with platforms limits. (David Carlier) - . Added pcntl_getcpu for Linux/FreeBSD/Solaris/Illumos. (David Carlier) - . Added pcntl_getqos_class/pcntl_setqos_class for macOs. (David Carlier) - . Added SIGCKPT/SIGCKPTEXIT constants for DragonFlyBSD. (David Carlier) - . Added FreeBSD's SIGTRAP handling to pcntl_siginfo_to_zval. (David Carlier) - . Added POSIX pcntl_waitid. (Vladimir Vrzić) - -- PCRE: - . Upgrade bundled pcre2lib to version 10.43. (nielsdos) - . Add "/r" modifier. (Ayesh) - . Upgrade bundled pcre2lib to version 10.44. (Ayesh) - -- PDO: - . Fixed setAttribute and getAttribute. (SakiTakamachi) - . Implemented PDO driver-specific subclasses RFC. (danack, kocsismate) - . Added support for PDO driver-specific SQL parsers. (Matteo Beccati) - -- PDO_DBLIB: - . Fixed setAttribute and getAttribute. (SakiTakamachi) - . Added class Pdo\DbLib. (danack, kocsismate) - -- PDO_FIREBIRD: - . Fixed setAttribute and getAttribute. (SakiTakamachi) - . Feature: Add transaction isolation level and mode settings to pdo_firebird. - (SakiTakamachi) - . Added class Pdo\Firebird. (danack, kocsismate) - -- PDO_MYSQL: - . Fixed setAttribute and getAttribute. (SakiTakamachi) - . Added class Pdo\Mysql. (danack, kocsismate) - . Added custom SQL parser. (Matteo Beccati) - -- PDO_ODBC: - . Added class Pdo\Odbc. (danack, kocsismate) - -- PDO_PGSQL: - . Fixed GH-12423, DSN credentials being prioritized over the user/password - PDO constructor arguments. (SakiTakamachi) - . Fixed native float support with pdo_pgsql query results. (Yurunsoft) - . Added class Pdo\Pgsql. (danack, kocsismate) - . Retrieve the memory usage of the query result resource. (KentarouTakeda) - . Added Pdo\Pgsql::setNoticeCallBack method to receive DB notices. - (outtersg) - . Added custom SQL parser. (Matteo Beccati) - -- PDO_SQLITE: - . Added class Pdo\Sqlite. (danack, kocsismate) - . Fixed bug #81227 (PDO::inTransaction reports false when in transaction). - (nielsdos) - . Added custom SQL parser. (Matteo Beccati) - -- PGSQL: - . Added the possibility to have no conditions for pg_select. (OmarEmaraDev) - . Persistent connections support the PGSQL_CONNECT_FORCE_RENEW flag. - (David Carlier) - . Added pg_result_memory_size to get the query result memory usage. - (KentarouTakeda) - . Added pg_change_password to alter an user's password. (David Carlier) - . Added pg_put_copy_data/pg_put_copy_end to send COPY commands and signal - the end of the COPY. (David Carlier) - . Added pg_socket_poll to poll on the connection. (David Carlier) - . Added pg_jit to get infos on server JIT support. (David Carlier) - . Added pg_set_chunked_rows_size to fetch results per chunk. (David Carlier) - -- Phar: - . Fixed bug GH-12532 (PharData created from zip has incorrect timestamp). - (nielsdos) - -- POSIX: - . Added POSIX_SC_CHILD_MAX and POSIX_SC_CLK_TCK constants. (Jakub Zelenka) - . Updated posix_isatty to set the error number on file descriptors. - (David Carlier) - -- PSpell: - . Moved to PECL. (Derick Rethans) - -- Reflection: - . Implement GH-12908 (Show attribute name/class in ReflectionAttribute dump). - (nielsdos) - . Make ReflectionGenerator::getFunction() legal after generator termination. - (timwolla) - . Added ReflectionGenerator::isClosed(). (timwolla) - -- SimpleXML: - . Fixed bug GH-12192 (SimpleXML infinite loop when getName() is called - within foreach). (nielsdos) - . Fixed bug GH-12208 (SimpleXML infinite loop when a cast is used inside a - foreach). (nielsdos) - . Fixed bug #55098 (SimpleXML iteration produces infinite loop). (nielsdos) - . Fix signature of simplexml_import_dom(). (nielsdos) - -- Sockets: - . Added multicast group support for ipv4 on FreeBSD. (jonathan@tangential.ca) - . Added the TCP_SYNCNT constant for Linux to set number of attempts to send - SYN packets from the client. (David Carlier) - . Added the SO_EXCLBIND constant for exclusive socket binding on illumos/solaris. - (David Carlier) - . Updated the socket_create_listen backlog argument default value to SOMAXCONN. - (David Carlier) - . Added the SO_NOSIGPIPE constant to control the generation of SIGPIPE for - macOs and FreeBSD. (David Carlier) - . Added SO_LINGER_SEC for macOs, true equivalent of SO_LINGER in other platforms. - (David Carlier) - . Add close-on-exec on socket created with socket_accept on unixes. (David Carlier) - -- SNMP: - . Removed the deprecated inet_ntoa call support. (David Carlier) - -- SOAP: - . Add support for clark notation for namespaces in class map. (lxShaDoWxl) - . Mitigate #51561 (SoapServer with a extented class and using sessions, - lost the setPersistence()). (nielsdos) - . Fixed bug #49278 (SoapClient::__getLastResponseHeaders returns NULL if - wsdl operation !has output). (nielsdos) - . Fixed bug #44383 (PHP DateTime not converted to xsd:datetime). (nielsdos) - . Fixed bug GH-11941 (soap with session persistence will silently fail when - "session" built as a shared object). (nielsdos) - -- Sockets: - . Removed the deprecated inet_ntoa call support. (David Carlier) - . Added the SO_EXECLUSIVEADDRUSE windows constant. (David Carlier) - . Added the SOCK_CONN_DGRAM/SOCK_DCCP netbsd constants. (David Carlier) - -- Sodium: - . Add support for AEGIS-128L and AEGIS-256. (jedisct1) - . Enable AES-GCM on aarch64 with the ARM crypto extensions. (jedisct1) - -- SPL: - . Implement SeekableIterator for SplObjectStorage. (nielsdos) - -- Standard: - . Implement GH-12188 (Indication for the int size in phpinfo()). (timwolla) - . Partly fix GH-12143 (Incorrect round() result for 0.49999999999999994). - (timwolla) - . Fix GH-12252 (round(): Validate the rounding mode). (timwolla) - . Increase the default BCrypt cost to 12. (timwolla) - . Fixed bug GH-12592 (strcspn() odd behaviour with NUL bytes and empty mask). - (nielsdos) - . Removed the deprecated inet_ntoa call support. (David Carlier) - . Cast large floats that are within int range to int in number_format so - the precision is not lost. (Marc Bennewitz) - . Add support for 4 new rounding modes to the round() function. (Jorg Sowa) - . debug_zval_dump() now indicates whether an array is packed. (Max Semenik) - . Fix GH-12143 (Optimize round). (SakiTakamachi) - . Changed return type of long2ip to string from string|false. (Jorg Sowa) - . Fix GH-12143 (Extend the maximum precision round can handle by one digit). - (SakiTakamachi) - . Added the http_get_last_response_headers() and - http_clear_last_response_headers() that allows retrieving the same content - as the magic $http_response_header variable. - . Add php_base64_encode_ex() API. (Remi) - . Implemented "Raising zero to the power of negative number" RFC. (Jorg Sowa) - . Added array_find(), array_find_key(), array_all(), and array_any(). (josh) - -- XML: - . Added XML_OPTION_PARSE_HUGE parser option. (nielsdos) - -- XMLReader: - . Declares class constant types. (Ayesh) - . Add XMLReader::fromStream(), XMLReader::fromUri(), XMLReader::fromString(). (nielsdos) - -- XMLWriter: - . Add XMLWriter::toStream(), XMLWriter::toUri(), XMLWriter::toMemory(). (nielsdos) - -- XSL: - . Implement request #64137 (XSLTProcessor::setParameter() should allow both - quotes to be used). (nielsdos) - . Implemented "Improve callbacks in ext/dom and ext/xsl" RFC. (nielsdos) - . Added XSLTProcessor::$maxTemplateDepth and XSLTProcessor::$maxTemplateVars. - (nielsdos) +?? ??? ????, PHP 8.5.0alpha1 <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/UPGRADING b/UPGRADING index 96e0ef92a8b..88f66696cb4 100644 --- a/UPGRADING +++ b/UPGRADING @@ -1,4 +1,4 @@ -PHP 8.4 UPGRADE NOTES +PHP 8.5 UPGRADE NOTES 1. Backward Incompatible Changes 2. New Features @@ -19,1133 +19,42 @@ PHP 8.4 UPGRADE NOTES 1. Backward Incompatible Changes ======================================== -- CLI: - . The builtin server looks for an index file recursively by traversing parent - directories in case the specified file cannot be located. This process was - previously skipped if the path looked like it was referring to a file, i.e. - if the last path component contained a period. In that case, a 404 error was - returned. The behavior has been changed to look for an index file in all - cases. - -- Core: - . The type of PHP_DEBUG and PHP_ZTS constants changed to bool. - . The name of uploaded files and files created by the tempnam() function are - now 13 bytes longer. Total length is platform-dependent. - . Encountering recursion during comparison now results in a Error exception, - rather than a fatal error. - . Indirect modification of readonly properties within __clone() is no longer - allowed, e.g. $ref = &$this->readonly. This was already forbidden for - readonly initialization, and was an oversight in the "readonly - reinitialization during cloning" implementation. - . The exit (and die) language constructs now behave more like a function. - They can be passed liked callables, are affected by the strict_types - declare statement, and now perform the usual type coercions instead of - casting any non-integer value to a string. - As such, passing invalid types to exit/die may now result in a TypeError - being thrown. - RFC: https://wiki.php.net/rfc/exit-as-function - . The E_STRICT constant was deprecated and its corresponding error level was - removed. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant - -- DBA: - . dba_open() and dba_popen() will now return a Dba\Connection - object rather than a resource. Return value checks using is_resource() - should be replaced with checks for `false`. - -- DOM: - . Added DOMNode::compareDocumentPosition() and DOMNode::DOCUMENT_POSITION_* - constants. - If you have a method or constant with the same name, you might encounter errors - if the declaration is incompatible. - . Some DOM methods previously returned false or a PHP_ERR DOMException if a new - node could not be allocated. They consistently throw an INVALID_STATE_ERR - DOMException now. This situation is extremely unlikely though and probably - will not affect you. As a result DOMImplementation::createDocument() now has - a tentative return type of DOMDocument instead of DOMDocument|false. - . Previously, DOMXPath objects could be cloned, but resulted in an unusable - object. This is no longer possible, and cloning a DOMXPath object now throws - an error. - . DOMDocument::$actualEncoding, DOMDocument::config, DOMEntity::$actualEncoding, - DOMEntity::$encoding, DOMEntity::$version have been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#formally_deprecate_soft-deprecated_domdocument_and_domentity_properties - -- GMP: - . The GMP class is now final and cannot be extended anymore. - RFC: https://wiki.php.net/rfc/gmp-final - . Casting a GMP object to bool changed so that 0 becomes false and everything else - becomes true. - RFC: https://wiki.php.net/rfc/fix_up_bcmath_number_class - -- Intl: - . 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 integer - -- MBString: - . mb_encode_numericentity() and mb_decode_numericentity() now check that - the $map is only composed of integers, if not a ValueError is thrown. - . mb_http_input() now always throws a ValueError if the $type is invalid. - . mb_http_output() now checks that the $encoding parameter does not - contain any null bytes. If it does, a ValueError is now thrown. - . On invalid strings (those with encoding errors), mb_substr() now interprets - character indices in the same manner as most other mbstring functions. This - means that character indices returned by mb_strpos() can be passed to mb_substr(). - . For SJIS-Mac (MacJapanese) strings, character indices passed to mb_substr() now - refer to the indices of the Unicode codepoints which are produced when the string - is converted to Unicode. This is significant because around 40 SJIS-Mac characters - convert to a sequence of multiple Unicode codepoints. - -- MySQLnd: - . The error code reported for MySQL server wait timeouts has been changed from 2006 - to 4031 for MySQL server versions 8.0.24 and above. - -- ODBC: - . odbc_fetch_row() returns false when a value less than or equal to 0 is - passed for parameter $row. Now, a warning is emitted in this case. - . odbc_connect() and odbc_pconnect() will now return an Odbc\Connection - object rather than a resource. Return value checks using is_resource() - should be replaced with checks for `false`. - . odbc_prepare(), odbc_exec(), and various other functions will now return - an Odbc\Result object rather than a resource. Return value checks using - is_resource() should be replaced with checks for `false`. - -- Opcache: - . The JIT config defaults changed from opcache.jit=tracing and - opcache.jit_buffer_size=0 to opcache.jit=disable and - opcache.jit_buffer_size=64M, respectively. This does not affect the default - behavior, the JIT is still disabled by default. However, it is now disabled - through the opcache.jit setting, rather than opcache.jit_buffer_size. This - may affect users who previously enabled JIT through opcache.jit_buffer_size - exclusively, without also specifying a JIT mode using opcache.jit. To enable - JIT, set the opcache.jit config value accordingly. - . The maximum value of the opcache.interned_strings_buffer setting on 64bit - architectures is now 32767 (it was previously 4095). - . If JIT is enabled, PHP will now exit with a fatal error on startup in case - of JIT startup initialization issues. - -- PCNTL: - . The functions pcntl_sigprocmask(), pcntl_sigwaitinfo() and - pcntl_sigtimedwait() now throw: - - A ValueError if the $signals array is empty (except for - pcntl_sigprocmask() if the $mode is SIG_SETMASK). - - A TypeError if a value of the $signals array is not an integer - - A ValueError if a value of the $signals array is not a valid signal number - Moreover, those functions now always return false on failure. - In some case previously it could return the value -1. - . The function pcntl_sigprocmask() will also now throw: - - A ValueError if $mode is not one of SIG_BLOCK, SIG_UNBLOCK, or SIG_SETMASK - . The function pcntl_sigtimedwait() will also now throw: - - A ValueError if $seconds is less than 0 - - A ValueError if $nanoseconds is less than 0 or greater than 1e9 - - A ValueError if both $seconds and $nanoseconds are 0 - -- PCRE: - . The bundled pcre2lib has been updated to version 10.44. - As a consequence, this means {,3} is now recognized as a quantifier instead - of as text. Furthermore, the meaning of some character classes in UCP mode - has changed. Consult https://github.com/PCRE2Project/pcre2/blob/master/NEWS - for a full changelog. - -- PDO_DBLIB: - . setAttribute, DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER and DBLIB_ATTR_DATETIME_CONVERT - have been changed to set value as a bool. - -- PDO_FIREBIRD: - . Since some Firebird C++ APIs are used now, this extension requires a C++ - compiler to be built. This also implies that the extension has to be built - against fbclient 3.0 or higher. - . getAttribute, ATTR_AUTOCOMMIT has been changed to get the value as a bool. - -- PDO_MYSQL: - . getAttribute, ATTR_AUTOCOMMIT, ATTR_EMULATE_PREPARES, MYSQL_ATTR_DIRECT_QUERY have - been changed to get values as bool. - -- PDO_PGSQL: - . The DSN's credentials, when set, are given priority over their PDO - constructor counterparts, being closer to the documentation states. - -- Reflection: - . Added methods ReflectionClass::newLazyGhost(), - ReflectionClass::newLazyProxy(), ReflectionClass::resetAsLazyGhost(), - ReflectionClass::resetAsLazyProxy(), - ReflectionClass::isUninitializedLazyObject(), - ReflectionClass::initializeLazyObject(), - ReflectionClass::markLazyObjectAsInitialized(), - ReflectionClass::getLazyInitializer(), - ReflectionProperty::skipLazyInitialization(), - ReflectionProperty::setRawValueWithoutLazyInitialization() and constants - ReflectionClass::SKIP_*. - If you have a method or constant with the same name, you might encounter - errors if the declaration is incompatible. - -- SimpleXML: - . Get methods called, or casting to a string on a SimpleXMLElement will no - longer implicitly reset the iterator data, unless explicitly rewound. - For example, casting an element to a string within a foreach loop would - cause an infinite loop because it destroyed the current iterator data. - This is no longer the case as a consequence of the bugfixes for GH-12192, - GH-12208, #55098. - . Calling simplexml_import_dom() with a non-XML object now throws a TypeError - instead of a ValueError. - -- SOAP: - . SoapClient::$httpurl is now a Soap\Url object rather than a resource. - Checks using is_resource() (i.e. is_resource($client->httpurl)) should be - replaced with checks for null (i.e. $client->httpurl !== null). - . SoapClient::$sdl is now a Soap\Sdl object rather than a resource. - Checks using is_resource() (i.e. is_resource($client->sdl)) should be - replaced with checks for null (i.e. $client->sdl !== null). - . SoapClient::$typemap is now an array rather than a resource. - Checks using is_resource() (i.e. is_resource($client->typemap)) should be - replaced with checks for null (i.e. $client->typemap !== null). - . The SOAP extension gained an optional dependency on the session extension. - If you build PHP without the session extension and with --enable-rtld-now, - you will experience errors on startup if you also use the SOAP extension. - To solve this, either don't use rtld-now or load the session extension. - -- SPL: - . Out of bounds accesses in SplFixedArray now throw an exception of type - OutOfBoundsException instead of RuntimeException. As OutOfBoundsException - is a child class of RuntimeException, code that uses RuntimeException - continues to function. - -- Standard: - . round() now validates the value of the $mode parameter and throws a ValueError - for invalid modes. Previously invalid modes would have been interpreted as - PHP_ROUND_HALF_UP. - . strcspn() with empty $characters now returns the length of the string instead - of incorrectly stopping at the first NUL character. See GH-12592. - . The str_getcsv() function now throws ValueErrors when the $separator and - $enclosure arguments are not one byte long, or if the $escape is not one - byte long or the empty string. This aligns the behaviour to be identical - to that of fputcsv() and fgetcsv(). - . php_uname() now throws ValueErrors on invalid inputs. - . The "allowed_classes" option for unserialize() now throws TypeErrors and - ValueErrors if it is not an array of class names. - . http_build_query() now correctly handles backed enums. - -- Tidy: - . Failures in the constructor now throw exceptions rather than emitting - warnings and having a broken object. - -- XML: - . The xml_set_*_handler() functions now declare and check for an effective - signature of callable|string|null for the $handler parameters. - Moreover, values of type string that correspond to method names, - of object set with xml_set_object() are now checked to see if the method - exists on the class of the previously passed object. - This means that xml_set_object() must now always be called prior to setting - method names as callables. - Passing an empty string to disable the handler is still allowed, - but deprecated. - -- XMLReader: - . Passing an invalid character encoding to XMLReader::open() or - XMLReader::XML() now throws a ValueError. Passing a string containing NULL - bytes previously emitted a warning and now throws a ValueError as well. - -- XMLWriter: - . Passing a string containing NULL bytes previously emitted a warning and - now throws a ValueError. - -- XSL: - . XSLTProcessor::setParameter() will now throw a ValueError when its arguments - contain null bytes. This never actually worked correctly in the first place, - which is why it throws an exception nowadays. - . Failure to call a PHP function callback during evaluation now throws - instead of emitting a warning. - RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl - . Calling XSLTProcessor::importStyleSheet() with a non-XML object now throws - a TypeError instead of a ValueError. - ======================================== 2. New Features ======================================== -- Core: - . Added request_parse_body() function that allows parsing RFC1867 (multipart) - requests in non-POST HTTP requests. - RFC: https://wiki.php.net/rfc/rfc1867-non-post - . Getting the debug info for WeakReference will now also output the object - it references, or null if the reference is no longer valid. - . The output of Closure::__debugInfo() now includes the name, file, and line - of the Closure. - . new expressions with constructor arguments are now dereferencable, meaning - they allow chaining method calls, property accesses, etc. without enclosing - the expression in parentheses. - RFC: https://wiki.php.net/rfc/new_without_parentheses - . Added the #[\Deprecated] attribute. - RFC: https://wiki.php.net/rfc/deprecated_attribute - . Implemented property hooks. - RFC: https://wiki.php.net/rfc/property-hooks - . Exiting a namespace now clears seen symbols. This allows using a symbol in a - namespace block, even if a previous namespace block declared a symbol with - the same name. - See Zend/tests/use_function/ns_end_resets_seen_symbols_1.phpt. - . Implemented asymmetric property visibility. - RFC: https://wiki.php.net/rfc/asymmetric-visibility-v2 - . Implemented lazy objects. - RFC: https://wiki.php.net/rfc/lazy-objects - -- Curl: - . curl_version() returns an additional feature_list value, which is an - associative array of all known Curl features, and whether they are - supported (true) or not (false). - . Added CURL_HTTP_VERSION_3 and CURL_HTTP_VERSION_3ONLY constants (available - since libcurl 7.66 and 7.88) as available options for CURLOPT_HTTP_VERSION. - . Added CURLOPT_PREREQFUNCTION as a Curl option that accepts a callback to - be called after the connection is made, but before the request is sent. - The callback must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT - to allow or abort the request. - . Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as - CURLOPT_FTP_RESPONSE_TIMEOUT. Both constants hold the same value. - . Added CURLOPT_DEBUGFUNCTION support. This Curl option accepts a callable - that gets called during the request lifetime with the CurlHandle object, - an integer containing the debug message type, and a string containing the - debug message. The debug message type is one of CURLINFO_TEXT, CURLINFO_HEADER_IN, - CURLINFO_HEADER_OUT, CURLINFO_DATA_IN, CURLINFO_DATA_OUT, CURLINFO_SSL_DATA_OUT, - CURLINFO_SSL_DATA_IN constants. Once this option is set, CURLINFO_HEADER_OUT - must not be set because it uses the same libcurl functionality. - . curl_getinfo() function now returns "posttransfer_time_us", containing the - number of microseconds from the start until the last byte is sent. When a - redirect is followed, the time from each request is added together. This - value can also be retrieved by passing CURLINFO_POSTTRANSFER_TIME_T to the - curl_getinfo() $option parameter. This requires libcurl 8.10.0 or later. - -- Date: - . Added static methods - DateTime[Immutable]::createFromTimestamp(int|float $timestamp): static. - . Added method DateTime[Immutable]::getMicrosecond(): int. - . Added method - DateTime[Immutable]::setMicrosecond(int $microsecond): static. - -- DOM: - . Added constant DOMNode::DOCUMENT_POSITION_DISCONNECTED. - . Added constant DOMNode::DOCUMENT_POSITION_PRECEDING. - . Added constant DOMNode::DOCUMENT_POSITION_FOLLOWING. - . Added constant DOMNode::DOCUMENT_POSITION_CONTAINS. - . Added constant DOMNode::DOCUMENT_POSITION_CONTAINED_BY. - . Added constant DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC. - . It is now possible to pass any callable to registerPhpFunctions(). - RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl - -- FPM: - . Flushing headers without a body will now succeed. See GH-12785. - . Status page has a new field to display a memory peak. - -- Hash: - . Added HashContext::__debugInfo(). - -- Intl: - . NumberFormatter::ROUND_HALFODD added to complement existing - NumberFormatter::ROUND_HALFEVEN functionality. - -- OpenSSL: - . Added support for Curve25519 + Curve448 based keys. Specifically x25519, - ed25519, x448 and ed448 fields are supported in openssl_pkey_new and - openssl_pkey_get_details as well as openssl_sign and openssl_verify were - extended to support those keys. - . Implement PASSWORD_ARGON2 password hashing. - Requires OpenSSL 3.2 and NTS build. - -- PCRE: - . The bundled pcre2lib has been updated to version 10.44. - As a consequence, LoongArch JIT support has been added, spaces - are now allowed between braces in Perl-compatible items, and - variable-length lookbehind assertions are now supported. - . With pcre2lib version 10.44, the maximum length of named capture groups - has changed from 32 to 128. - . Added support for the "r" (PCRE2_EXTRA_CASELESS_RESTRICT) modifier, as well - as the (?r) mode modifier. When enabled along with the case-insensitive - modifier ("i"), the expression locks out mixing of ASCII and non-ASCII - characters. - -- PDO: - . Added support for driver-specific subclasses. - RFC: https://wiki.php.net/rfc/pdo_driver_specific_subclasses - This RFC adds subclasses for PDO in order to better support - database-specific functionalities. The new classes are - instantiatable either via calling the PDO::connect() method - or by invoking their constructor directly. - . Added support for driver specific SQL parsers. The default parser supports: - - single and double quoted literals, with doubling as escaping mechanism. - - two-dashes and non-nested C-style comments. - RFC: https://wiki.php.net/rfc/pdo_driver_specific_parsers - -- PDO_DBLIB: - . Added class Pdo\DbLib. - -- PDO_FIREBIRD: - . Added class Pdo\Firebird. - -- PDO_MYSQL: - . Added class Pdo\Mysql. - . Added custom parser supporting: - - single and double-quoted literals, with doubling and backslash as escaping - mechanism - - backtick literal identifiers and with doubling as escaping mechanism - - two dashes followed by at least 1 whitespace, non-nested C-style comments, - and hash-comments - RFC: https://wiki.php.net/rfc/pdo_driver_specific_parsers - -- PDO_ODBC: - . Added class Pdo\Odbc. - -- PDO_PGSQL: - . Added class Pdo\Pgsql. - . Added custom parser supporting: - - single and double quoted literals, with doubling as escaping mechanism - - C-style "escape" string literals (E'string') - - dollar-quoted string literals - - two-dashes and C-style comments (non-nested) - - support for "??" as escape sequence for the "?" operator - RFC: https://wiki.php.net/rfc/pdo_driver_specific_parsers - -- PDO_SQLITE: - . Added class Pdo\Sqlite. - . Added custom parser supporting: - - single, double quoted, and backtick literals, with doubling as escaping mechanism - - square brackets quoting for identifiers - - two-dashes and C-style comments (non-nested) - RFC: https://wiki.php.net/rfc/pdo_driver_specific_parsers - -- PgSQL: - . Added pg_result_memory_size to get the visibility the memory used by a query result. - -- Phar: - . Added support for the unix timestamp extension for zip archives. - -- POSIX: - . Added constant POSIX_SC_CHILD_MAX - . Added constant POSIX_SC_CLK_TCK - -- Readfile: - . Added ability to change .php_history path through PHP_HISTFILE env variable. - -- Reflection: - . ReflectionAttribute now contains a $name property to improve the debugging - experience. - . ReflectionClassConstant::__toString() and ReflectionProperty::__toString() - now returns the attached doc comments. - . ReflectionConstant was introduced. - . ReflectionClassConstant::isDeprecated() was introduced. - . ReflectionGenerator::isClosed() was introduced. - . Multiple methods and constants related to lazy objects were introduced: - - ReflectionClass::newLazyGhost() - - ReflectionClass::newLazyProxy() - - ReflectionClass::resetAsLazyGhost() - - ReflectionClass::resetAsLazyProxy() - - ReflectionClass::isUninitializedLazyObject() - - ReflectionClass::initializeLazyObject() - - ReflectionClass::markLazyObjectAsInitialized() - - ReflectionClass::getLazyInitializer() - - ReflectionProperty::skipLazyInitialization() - - ReflectionProperty::setRawValueWithoutLazyInitialization() - - ReflectionClass::SKIP_INITIALIZATION_ON_SERIALIZE - - ReflectionClass::SKIP_DESTRUCTOR - RFC: https://wiki.php.net/rfc/lazy-objects - . ReflectionProperty::isDynamic() was introduced. - -- SOAP: - . Added support for clark notation for namespaces in class map. - It is now possible to specify entries in a class map with clark notation - to resolve a type with a specific namespace to a specific class. - For example: '{http://example.com}foo' => 'FooClass'. - . Instances of DateTimeInterface that are passed to xsd:datetime or similar - elements are now serialized as such instead of being serialized as an - empty string. - . Session persistence now works with a shared session module. - -- Standard: - . stream_bucket_make_writeable() and stream_bucket_new() will now return a - StreamBucket instance instead of an instance of stdClass. - RFC: https://wiki.php.net/rfc/dedicated_stream_bucket - . Added a new RoundingMode enum with clearer naming and improved discoverability - compared to the PHP_ROUND_* constants. - RFC: https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum - -- XSL: - . It is now possible to use parameters that contain both single and double - quotes. - . It is now possible to pass any callable to registerPhpFunctions(). - RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl - . Added XSLTProcessor::$maxTemplateDepth and XSLTProcessor::$maxTemplateVars - to control the recursion depth of XSL template evaluation. - -- Zip: - . Added ZipArchive::ER_TRUNCATED_ZIP added in libzip 1.11 - ======================================== 3. Changes in SAPI modules ======================================== -- apache2handler - . Support for EOL Apache 2.0 and 2.2 has been removed. Minimum required Apache - version is now 2.4. - -- FPM: - . /dev/poll events.mechanism setting for Solaris/Illumos had been retired. - ======================================== 4. Deprecated Functionality ======================================== -- Core: - . Implicitly nullable parameter types are now deprecated. - RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types - . Passing E_USER_ERROR to trigger_error() is now deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error - . Using "_" as a class name is now deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_using_a_single_underscore_as_a_class_name - -- Curl: - . The CURLOPT_BINARYTRANSFER constant is deprecated. - -- Date: - . Calling DatePeriod::__construct(string $isostr, int $options = 0) is - deprecated. Use DatePeriod::createFromISO8601String() instead. - . Constants SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, and - SUNFUNCS_RET_DOUBLE are now deprecated, following the deprecation of - the associated date_sunset() and date_sunrise() functions in PHP 8.1. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#constants_sunfuncs_ret_string_sunfuncs_ret_double_sunfuncs_ret_timestamp - -- DBA: - . Passing null or false to dba_key_split() is deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_null_and_false_to_dba_key_split - -- DOM: - . Deprecated DOM_PHP_ERR constant. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant - -- Hash: - . Deprecated passing incorrect data types for options to ext/hash functions. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_incorrect_data_types_for_options_to_exthash_functions - -- Intl: - . Calling intlcal_set() as well as calling IntlCalendar::set() with - more than 2 arguments is deprecated. Use either IntlCalendar::setDate() - or IntlCalendar::setDateTime() instead. - . Calling intlgregcal_create_instance() as well as calling - IntlGregorianCalendar::__construct() with more than 2 arguments is - deprecated. Use either IntlGregorianCalendar::createFromDate() or - IntlGregorianCalendar::createFromDateTime() instead. - -- LDAP: - . Calling ldap_connect() with more than 2 arguments is deprecated. Use - ldap_connect_wallet() instead. - . Calling ldap_exop() with more than 4 arguments is deprecated. Use - ldap_exop_sync() instead. - -- Mysqli: - . The mysqli_ping() function and mysqli::ping() method are now deprecated, - as the reconnect feature was removed in PHP 8.2. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#mysqli_ping_and_mysqliping - . The mysqli_kill() function and mysqli::kill() method are now deprecated. - If this functionality is needed a SQL "KILL" command can be used instead. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_mysqli_kill - . The mysqli_refresh() function and mysqli::refresh() method are now deprecated. - If this functionality is needed a SQL "FLUSH" command can be used instead. - All MYSQLI_REFRESH_* constants have been deprecated as well. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_mysqli_refresh - . Passing explicitly the $mode parameter to mysqli_store_result() has been - deprecated. As the MYSQLI_STORE_RESULT_COPY_DATA constant was only used in - conjunction with this function it has also been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_the_second_parameter_to_mysqli_store_result - -- PDO_PGSQL: - . Using escaped question marks (??) inside dollar-quoted strings is deprecated. - Since PDO_PGSQL has its own SQL parser with dollar-quoted strings support, it - is no longer necessary to escape question marks inside them. - -- PgSQL: - . Calling pg_fetch_result() with 2 arguments is deprecated. Use the - 3-parameter signature with a null $row parameter instead. - . Calling pg_field_prtlen() with 2 arguments is deprecated. Use the - 3-parameter signature with a null $row parameter instead. - . Calling pg_field_is_null() with 2 arguments is deprecated. Use the - 3-parameter signature with a null $row parameter instead. - -- Random: - . lcg_value() is deprecated, as the function is broken in multiple ways. - Use \Random\Randomizer::getFloat() instead. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_lcg_value - -- Reflection: - . Calling ReflectionMethod::__construct() with 1 argument is deprecated. - Use ReflectionMethod::createFromMethodName() instead. - -- Session: - . Calling session_set_save_handler() with more than 2 arguments is - deprecated. Use the 2-parameter signature instead. - . Changing the INI settings session.sid_length and session.sid_bits_per_character - is deprecated. Update the session storage backend to accept 32 character - hexadecimal session IDs and stop changing these two INI settings. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#sessionsid_length_and_sessionsid_bits_per_character - . Changing the INI settings session.use_only_cookies, session.use_trans_sid, - session.trans_sid_tags, session.trans_sid_hosts, and session.referer_check - is deprecated. - RFC: https://wiki.php.net/rfc/deprecate-get-post-sessions - -- SOAP: - . Passing an int to SoapServer::addFunction() is now deprecated. - If all PHP functions need to be provided flatten the array returned by - get_defined_functions(). - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_soap_functions_all_constant_and_passing_it_to_soapserveraddfunction - . The SOAP_FUNCTIONS_ALL constant is now deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_soap_functions_all_constant_and_passing_it_to_soapserveraddfunction - -- SPL: - . The SplFixedArray::__wakeup() method has been deprecated as it implements - __serialize() and __unserialize() which need to be overwritten instead. - . Using the default value for $escape parameter of: - - SplFileObject::setCsvControl() - - SplFileObject::fputcsv() - - SplFileObject::fgetcsv() - is now deprecated. It must be passed explicitly either positionally or via named arguments. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_proprietary_csv_escaping_mechanism - -- Standard: - . Calling stream_context_set_option() with 2 arguments is deprecated. - Use stream_context_set_options() instead. - . Raising zero to the power of negative number is deprecated. - RFC: https://wiki.php.net/rfc/raising_zero_to_power_of_negative_number - . Unserializing strings using the uppercase 'S' tag is deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#unserialize_s_s_tag - . Using the default value for $escape parameter of: - - fputcsv() - - fgetcsv() - - str_getcsv() - is now deprecated. It must be passed explicitly either positionally or via named arguments. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_proprietary_csv_escaping_mechanism - -- XML: - . The xml_set_object() function has been deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#xml_set_object_and_xml_set_handler_with_string_method_names - . Passing non-callable strings to the xml_set_*_handler() functions is now - deprecated. - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#xml_set_object_and_xml_set_handler_with_string_method_names - ======================================== 5. Changed Functions ======================================== -- Core: - . trigger_error() and user_error() now have a return type of true instead of - bool. - -- Curl: - . curl_multi_select throws a ValueError if the timeout argument if it's negative - or greater than PHP_INT_MAX. - -- DOM: - . DOMDocument::registerNodeClass() now has a tentative return type of true. - Previously, the return type was bool but only true could be returned in practice. - -- GD: - . imagejpeg/imagewebp/imagepng/imageavif throws an exception if an invalid - quality parameter value is passed. In addition, imageavif will throw an exception - if an invalid speed parameter value is passed. - . imagescale throws an exception if the width/height argument underflows/overflows or - if the mode argument is invalid. - imagefilter with IMG_FILTER_SCATTER throws an exception if the sub/plus arguments - underflows/overflows. - -- Gettext: - . bind_textdomain_codeset, textdomain and d(*)gettext functions now throw an exception - if the domain argument is empty. - -- Hash: - . Changed the return type of hash_update() to true. It was already the case that only - true could be returned, but the stub was not updated yet. - -- Intl: - . IntlDateFormatter::__construct() throws a ValueError if the locale is invalid. - . NumberFormatter::__construct() throws a ValueError if the locale is invalid. - . NumberFormatter::ROUND_TOWARD_ZERO and NumberFormatter::ROUND_AWAY_FROM_ZERO - have been added as aliases for NumberFormatter::ROUND_DOWN and - NumberFormatter::ROUND_UP to be consistent with the new PHP_ROUND_* modes. - RFC: https://wiki.php.net/rfc/new_rounding_modes_to_round_function - . ResourceBundle::get() now has a tentative return type of: - ResourceBundle|array|string|int|null - -- LibXML: - . libxml_set_streams_context() now immediately throws a TypeError when a - non-stream-context resource is passed to the function, instead of throwing - later when the stream context is used. - -- MBString: - . The behavior of mb_strcut is more consistent now on invalid UTF-8 and UTF-16 - strings. (For valid UTF-8 and UTF-16 strings, there is no change.) - -- ODBC: - . Parameter $row of odbc_fetch_object(), odbc_fetch_array(), and - odbc_fetch_into() now has a default value of null, consistent with - odbc_fetch_row(). Previously, the default values were -1, -1, and 0, - respectively. - -- OpenSSL: - . The extra_attributes parameter in openssl_csr_new sets CSR attributes - instead of subject DN which was incorrectly done previously. - . The dn parameter in openssl_csr_new allows setting array of values for - a single entry. - . New serial_hex parameter added to openssl_csr_sign to allow setting serial - number in the hexadecimal format. - . Parsing ASN.1 UTCTime by openssl_x509_parse fails if seconds are omitted - for OpenSSL version below 3.2 (-1 is returned for such fields). The - OpenSSL version 3.3+ does not load such certificates already. - -- Output: - . Output handler status flags passed to the flags parameter of ob_start - are now cleared. - -- PDO: - . getAttribute, enabled to get the value of ATTR_STRINGIFY_FETCHES. - -- PDO_FIREBIRD: - . getAttribute, enabled to get values of FB_ATTR_DATE_FORMAT, FB_ATTR_TIME_FORMAT, - FB_ATTR_TIMESTAMP_FORMAT. - . Added new attributes to specify transaction isolation level and access mode. - Along with these, five constants (Pdo\Firebird::TRANSACTION_ISOLATION_LEVEL, - Pdo\Firebird::READ_COMMITTED, Pdo\Firebird::REPEATABLE_READ, - Pdo\Firebird::SERIALIZABLE, Pdo\Firebird::WRITABLE_TRANSACTION) have been added. - . When using persistent connections, there is now a liveness check in the - constructor. - . The content that is built changes depending on the value of FB_API_VER in - ibase.h, so added static method Pdo\Firebird::getApiVersion() to obtain that - value. This value can also be referenced from phpinfo. - . Five new data types are now available: INT128, DEC16, DEC34, TIMESTAMP_TZ, TIME_TZ. - These are available starting with Firebird 4.0. - -- PDO_MYSQL: - . getAttribute, enabled to get the value of ATTR_FETCH_TABLE_NAMES. - -- PDO_PGSQL: - . getAttribute() can now retrieve the memory usage of query results. - PDO::PGSQL_ATTR_RESULT_MEMORY_SIZE was added for this feature. - . If the column is of FLOAT4OID/FLOAT8OID type, query returns it as a - float instead of a string. - -- PGSQL: - . pg_select, the conditions arguments accepts an empty array and is optional. - -- Phar: - . Phar::setAlias() and Phar::setDefaultStub() methods now have a tentative - return type of true instead of bool. - -- POSIX: - . posix_isatty now sets the error number when the file descriptor/stream argument - is invalid. - -- Reflection: - . ReflectionGenerator::getFunction() may now be called after the generator - finished executing. - -- Sockets: - . Parameter $backlog of socket_create_listen() now has a default value of SOMAXCONN. - Previously, it was 128. - -- SPL: - . SplPriorityQueue::insert() and SplPriorityQueue::recoverFromCorruption() - now has a tentative return type of true - . SplHeap::insert() and SplHeap::recoverFromCorruption() - now has a tentative return type of true instead of bool - -- Standard: - . The internal implementation for rounding to integers has been rewritten - to be easier to verify for correctness and to be easier to maintain. - Some rounding bugs have been fixed as a result of the rewrite. For - example previously rounding 0.49999999999999994 to the nearest integer - would have resulted in 1.0 instead of the correct result 0.0. Additional - inputs might also be affected and result in different outputs compared to - earlier PHP versions. - . The $mode parameter of the round() function has been widened to RoundingMode|int, - accepting instances of a new RoundingMode enum. - RFC: https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum - . Four new modes have been added to the round() function: RoundingMode::PositiveInfinity, - RoundingMode::NegativeInfinity, RoundingMode::TowardsZero, RoundingMode::AwayFromZero. - RFC: https://wiki.php.net/rfc/new_rounding_modes_to_round_function - . Fixed a bug caused by "pre-rounding" of the round() function. Previously, using - "pre-rounding" to treat a value like 0.285 (actually 0.28499999999999998) as a - decimal number and round it to 0.29. However, "pre-rounding" incorrectly rounds - certain numbers, so this fix removes "pre-rounding" and changes the way numbers - are compared, so that the values are correctly rounded as decimal numbers. - . The maximum precision that can be handled by round() has been extended by one - digit. For example, `round(4503599627370495.5)` returned in `4503599627370495.5`, - but now returns `4503599627370496`. - . The default value of the 'cost' option for PASSWORD_BCRYPT for password_hash() - has been increased from '10' to '12'. - RFC: https://wiki.php.net/rfc/bcrypt_cost_2023 - . debug_zval_dump() now indicates whether an array is packed. - . long2ip() now returns string instead of string|false. - . output_add_rewrite_var() now uses url_rewriter.hosts instead of - session.trans_sid_hosts for selecting hosts that will be rewritten. - . highlight_string() now has a return type of string|true instead of string|bool. - . print_r() now has a return type of string|true instead of string|bool. - ======================================== 6. New Functions ======================================== -- BCMath: - . Added bcfloor(), bcceil(), bcround(). - RFC: https://wiki.php.net/rfc/adding_bcround_bcfloor_bcceil_to_bcmath - . Added bcdivmod(). - RFC: https://wiki.php.net/rfc/add_bcdivmod_to_bcmath - -- DOM: - . Added DOMNode::compareDocumentPosition(). - . Added DOMXPath::registerPhpFunctionNS(). - RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl - . Added DOMXPath::quote() to quote a string for use in an XPath expression. - Example usage: "//span[contains(text()," . $xpath->quote($string) . ")]" - -- Intl: - . Added IntlDateFormatter::getIanaID()/intltz_get_iana_id() to - the IANA identifier from a given timezone. - . Added grapheme_str_split which allow to support emoji and Variation - Selectors. - RFC: https://wiki.php.net/rfc/grapheme_str_split - . Added IntlDateFormatter::parseToCalendar which behaves like - IntlDateFormatter::parse except the time zone is updated. - . Added SpoofChecker::setAllowedChars to limit the range of unicode - chars. - -- MBString: - . Added mb_trim, mb_ltrim and mb_rtrim functions. - RFC: https://wiki.php.net/rfc/mb_trim - Note: this was amended by GH-13820 to fix GH-13815. - . Added mb_ucfirst and mb_lcfirst functions. - RFC: https://wiki.php.net/rfc/mb_ucfirst - -- OPCache: - . Added opcache_jit_blacklist function. It allows skipping the tracing JIT - execution of select functions. - -- PCNTL: - . Added pcntl_setns allowing a process to be reassociated with a namespace in order - to share resources with other processes within this context. - . Added pcntl_getcpuaffinity to get the cpu(s) bound to a process and - pcntl_setcpuaffinity to bind 1 or more cpus to a process. - . Added pcntl_getcpu to get the cpu id from where the current process runs. - . Added pcntl_getqos_class to get the QoS level (aka performance and related - energy consumption) of the current process and pcntl_setqos_class to set it. - . Added pcntl_waitid to obtain status information pertaining to termination, stop, - and/or continue events in one of the caller's child processes. - -- PDO_PGSQL: - . Added Pdo\Pgsql::setNoticeCallback() to allow a callback to be triggered on - every notice sent (e.g. RAISE NOTICE). - -- PGSQL: - . Added pg_change_password to alter a given user's password. It handles - transparently the password encryption from the database settings. - . Added pg_put_copy_data to send COPY commands and pg_put_copy_end to send - end-of-data to the server. - . Added pg_socket_poll to check if there is any read and/or write events - with an optional timeout. - . Added pg_jit to get informations on the server JIT support. - . Added pg_set_chunked_rows_size to allow to fetch results in chunk of - max N rows. - -- Reflection: - . Multiple methods related to lazy objects were introduced: - - ReflectionClass::newLazyGhost() - - ReflectionClass::newLazyProxy() - - ReflectionClass::resetAsLazyGhost() - - ReflectionClass::resetAsLazyProxy() - - ReflectionClass::isUninitializedLazyObject() - - ReflectionClass::initializeLazyObject() - - ReflectionClass::markLazyObjectAsInitialized() - - ReflectionClass::getLazyInitializer() - - ReflectionProperty::skipLazyInitialization() - - ReflectionProperty::setRawValueWithoutLazyInitialization() - RFC: https://wiki.php.net/rfc/lazy-objects - -- Sodium: - . Added the sodium_crypto_aead_aegis128l_*() and sodium_crypto_aead_aegis256l_*() - functions to support the AEGIS family of authenticated encryption algorithms, - that was introduced in libsodium 1.0.19. - . sodium_crypto_aead_aes256gcm_*() functions are now enabled on aarch64 CPUs - with the ARM cryptographic extensions. - -- SPL: - . Added seek() method to SplObjectStorage, now it implements - SeekableIterator. - -- SOAP: - . Added SoapServer::__getLastResponse(). This only tracks the last response - if the trace option is set to true in the SoapServer constructor's $options - argument. - -- Standard: - . Added the http_get_last_response_headers() and - http_clear_last_response_headers() that allows retrieving the same content - as the magic $http_response_header variable. - RFC: https://wiki.php.net/rfc/http-last-response-headers - . Added function fpow() following rules of IEEE 754. - RFC: https://wiki.php.net/rfc/raising_zero_to_power_of_negative_number - . Added functions array_find(), array_find_key(), array_all(), and - array_any(). - RFC: https://wiki.php.net/rfc/array_find - -- Tidy: - . Added tidyNode::getNextSibling() and tidyNode::getPreviousSibling(). - -- XMLReader: - . Added XMLReader::fromStream(), XMLReader::fromUri(), XMLReader::fromString(). - RFC: https://wiki.php.net/rfc/xmlreader_writer_streams - -- XMLWriter: - . Added XMLWriter::toStream(), XMLWriter::toUri(), XMLWriter::toMemory(). - RFC: https://wiki.php.net/rfc/xmlreader_writer_streams - -- XSL: - . Added XSLTProcessor::registerPhpFunctionNS(). - RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl - ======================================== 7. New Classes and Interfaces ======================================== -- BCMath: - . Added BcMath\Number class. It is an immutable object, has methods that are - equivalent to existing BCMath calculation functions, and can also be calculated - using operators. - The existing BCMath function returned a string for each calculation, but this - class returns an object. - RFC: https://wiki.php.net/rfc/support_object_type_in_bcmath, - https://wiki.php.net/rfc/fix_up_bcmath_number_class - -- Core: - . New RequestParseBodyException. - RFC: https://wiki.php.net/rfc/rfc1867-non-post - -- DOM: - . Implemented DOM HTML5 parsing and serialization. - RFC: https://wiki.php.net/rfc/domdocument_html5_parser. - This RFC adds the new Dom namespace along with new classes and - constant aliases. - There are two new classes to handle HTML and XML documents: - Dom\HTMLDocument and Dom\XMLDocument. - These classes provide a cleaner API to handle HTML and XML documents. - Furthermore, the Dom\HTMLDocument class implements spec-compliant HTML5 - parsing and serialization. - . Implemented opt-in ext/dom spec compliance RFC. - This adds new classes in the DOM namespace that correspond to modern - equivalents to the old DOM classes in the global namespaces. - The new classes follow the DOM living spec. - RFC: https://wiki.php.net/rfc/opt_in_dom_spec_compliance - . Implemented "New ext-dom features in PHP 8.4" RFC. - RFC: https://wiki.php.net/rfc/dom_additions_84 - ======================================== 8. Removed Extensions and SAPIs ======================================== -- IMAP: - . The IMAP extension has been unbundled and moved to PECL. - RFC: https://wiki.php.net/rfc/unbundle_imap_pspell_oci8 - -- OCI8: - . The OCI8 extension has been unbundled and moved to PECL. - RFC: https://wiki.php.net/rfc/unbundle_imap_pspell_oci8 - -- PDO_OCI: - . The PDO_OCI extension has been unbundled and moved to PECL. - RFC: https://wiki.php.net/rfc/unbundle_imap_pspell_oci8 - -- PSpell: - . The pspell extension has been unbundled and moved to PECL. - RFC: https://wiki.php.net/rfc/unbundle_imap_pspell_oci8 - ======================================== 9. Other Changes to Extensions ======================================== -- Curl: - . The Curl extension now requires at least libcurl 7.61.0. - . The CURLOPT_DNS_USE_GLOBAL_CACHE Curl option no longer has any - effect, and is silently ignored. This underlying feature was - deprecated in libcurl 7.11.1 and removed in 7.62.0. - -- Date: - . The class constants are typed now. - -- DOM: - . Removed DOMImplementation::getFeature(). - RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_domimplementationgetfeature_feature_version - -- Intl: - . The class constants are typed now. - . The behaviour of Intl class has been normalized to always throw Error - exceptions when attempting to use a non-initialized object, - or when cloning fails. - . The idn_to_ascii() and idn_to_utf8() now always throw ValueErrors if the - $domain name is empty or too long, and if $variant is not - INTL_IDNA_VARIANT_UTS46. - -- LibXML: - . The libxml extension now requires at least libxml2 2.9.4. - -- MBString: - . Unicode data tables have been updated to Unicode 16.0. - -- Mysqli: - . The unused and undocumented constant MYSQLI_SET_CHARSET_DIR - has been removed. - . The MYSQLI_STMT_ATTR_PREFETCH_ROWS constant has been removed. - The feature is unavailable with mysqlnd. - . The MYSQLI_CURSOR_TYPE_FOR_UPDATE and MYSQLI_CURSOR_TYPE_SCROLLABLE - constants have been removed. This functionality was never implemented, - neither with mysqlnd nor with libmysql. - . The unused MYSQLI_TYPE_INTERVAL constant, which is currently a stub - and an alias for MYSQLI_TYPE_ENUM, has been removed. There are no - plans to add such data type to MySQL yet, so it's unclear what its value - would finally be. - . A new constant has been added: MYSQLI_TYPE_VECTOR. - -- Mysqlnd: - . Support for the new VECTOR data type from MySQL 9. - -- OpenSSL: - . The OpenSSL extension now requires at least OpenSSL 1.1.1. - -- PDO: - . The class constants are typed now. - -- PDO_PGSQL: - . The pdo_pgsql extension now requires at least libpq 10.0. - -- PgSQL: - . The pgsql extension now requires at least libpq 10.0. - -- Reflection: - . The class constants are typed now. - -- Spl: - . The class constants are typed now. - -- Sqlite: - . The class constants are typed now. - -- XMLReader: - . The class constants are typed now. - -- XSL: - . The typed properties XSLTProcessor::$cloneDocument and - XSLTProcessor::$doXInclude are now declared. - -- zlib: - . The zlib extension now requires at least zlib 1.2.11. - ======================================== 10. New Global Constants ======================================== -- Core: - . PHP_OUTPUT_HANDLER_PROCESSED. - . PHP_SBINDIR. - -- Curl: - . CURL_HTTP_VERSION_3. - . CURL_HTTP_VERSION_3ONLY. - . CURL_TCP_KEEPCNT. - . CURLOPT_PREREQFUNCTION. - . CURL_PREREQFUNC_OK. - . CURL_PREREQFUNC_ABORT. - . CURLOPT_SERVER_RESPONSE_TIMEOUT. - . CURLOPT_DEBUGFUNCTION. - . CURLINFO_TEXT. - . CURLINFO_HEADER_IN. - . CURLINFO_DATA_IN. - . CURLINFO_DATA_OUT. - . CURLINFO_SSL_DATA_OUT. - . CURLINFO_SSL_DATA_IN. - . CURLINFO_POSTTRANSFER_TIME_T. - -- Intl: - . The IntlDateFormatter class exposes now the new PATTERN constant - reflecting udat api's UDAT_PATTERN. - . The IntlChar class exposes now the new PROPERTY_IDS_UNARY_OPERATOR (new - IDS binary operator), PROPERTY_ID_COMPAT_MATH_START, - PROPERTY_ID_COMPAT_MATH_CONTINUE (both for mathematical - identifier profiling purpose) constants. - -- LDAP: - . LDAP_OPT_X_TLS_PROTOCOL_MAX. - . LDAP_OPT_X_TLS_PROTOCOL_TLS1_3. - -- LibXML: - . LIBXML_RECOVER. - . LIBXML_NO_XXE. - This is used together with LIBXML_NOENT for when you want to perform entity - substitution, but want to disallow external entity loading. - This constant is available as of libxml2 2.13. - -- Mysqli: - . MYSQLI_TYPE_VECTOR. - -- OpenSSL: - . X509_PURPOSE_OCSP_HELPER. - . X509_PURPOSE_TIMESTAMP_SIGN. - -- PCNTL: - . Pcntl\QosClass::Background (macOs only). - . Pcntl\QosClass::Default (macOs only). - . Pctnl\QosClass::UserInteractive (macOs only). - . Pcntl\QosClass::UserInitiated (macOs only). - . Pcntl\QosClass::Utility (macOs only). - . SIGCKPT (DragonFlyBSD only). - . SIGCKPTEXIT (DragonFlyBSD only). - . WEXITED. - . WSTOPPED. - . WNOWAIT. - . P_ALL. - . P_PID. - . P_PGID. - . P_PIDFD (Linux only). - . P_UID (NetBSD/FreeBSD only). - . P_GID (NetBSD/FreeBSD only). - . P_SID (NetBSD/FreeBSD only). - . P_JAILID (FreeBSD only). - -- PgSQL: - . PGSQL_TUPLES_CHUNK - -- Sockets: - . SO_EXCLUSIVEADDRUSE (Windows only). - . SOCK_CONN_DGRAM (NetBSD only). - . SOCK_DCCP (NetBSD only). - . TCP_SYNCNT (Linux only). - . SO_EXCLBIND (Solaris/Illumos only). - . SO_NOSIGPIPE (macOs and FreeBSD). - . SO_LINGER_SEC (macOs only). - . IP_PORTRANGE (FreeBSD/NetBSD/OpenBSD only). - . IP_PORTRANGE_DEFAULT (FreeBSD/NetBSD/OpenBSD only). - . IP_PORTRANGE_HIGH (FreeBSD/NetBSD/OpenBSD only). - . IP_PORTRANGE_LOW (FreeBSD/NetBSD/OpenBSD only). - . SOCK_NONBLOCK. - . SOCK_CLOEXEC. - . SO_BINDTOIFINDEX. - -- Sodium: - . SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES - . SODIUM_CRYPTO_AEAD_AEGIS128L_NSECBYTES - . SODIUM_CRYPTO_AEAD_AEGIS128L_NPUBBYTES - . SODIUM_CRYPTO_AEAD_AEGIS128L_ABYTES - . SODIUM_CRYPTO_AEAD_AEGIS256_KEYBYTES - . SODIUM_CRYPTO_AEAD_AEGIS256_NSECBYTES - . SODIUM_CRYPTO_AEAD_AEGIS256_NPUBBYTES - . SODIUM_CRYPTO_AEAD_AEGIS256_ABYTES - -- XML: - . Added XML_OPTION_PARSE_HUGE to allow large inputs in xml_parse and - xml_parse_into_struct. - RFC: https://wiki.php.net/rfc/xml_option_parse_huge. - ======================================== 11. Changes to INI File Handling ======================================== @@ -1154,88 +63,10 @@ PHP 8.4 UPGRADE NOTES 12. Windows Support ======================================== -* Building with Visual Studio now requires at least Visual Studio 2019 (Visual - Studio 2022 is recommended, though). - -* Native AVX-512 builds are now supported (--enable-native-intrinsics=avx512). - ======================================== 13. Other Changes ======================================== -* Closure names have been adjusted to include the parent function's name - and the line of definition to make them easier to distinguish, for example - within stack traces. - -* run-tests.php now skips online tests by default. Set the SKIP_ONLINE_TESTS - environment variable to 0, or pass the --online flag to run-tests.php to - execute them. - -* Fiber switching during destructor execution is now allowed. It was previously - blocked due to conflicts with garbage collection. - - Destructors may now be executed in a separate Fiber: - - When garbage collection is triggered in a Fiber, destructors called by the GC - are executed in a separate Fiber: the gc_destructor_fiber. If this Fiber - suspends, a new one is created to execute the remaining destructors. The - previous gc_destructor_fiber is not referenced anymore by the GC and may be - collected if it's not referenced anywhere else. Objects whose destructor is - suspended will not be collected until the destructor returns or the Fiber is - collected. - ======================================== 14. Performance Improvements ======================================== - -- BCMath: - . Improved performance of number conversions and operations. - -- Core: - . Improved the performance of floating point number parsing and formatting in - ZTS builds under highly concurrent loads. This affects the `printf()` family - of functions as well as serialization functions such as `json_encode()`, - `serialize()`. - . `sprintf()` using only `%s` and `%d` will be compiled into the equivalent - string interpolation, avoiding the overhead of a function call and repeatedly - parsing the format string. - -- DOM: - . The performance of DOMNode::C14N() is greatly improved for the case without - an xpath query. This can give a time improvement of easily two order of - magnitude for documents with tens of thousands of nodes. - . Improved performance and reduce memory consumption of XML serialization. - . Reduced memory usage of node classes. - -- FTP: - . Improved the performance of FTP uploads up to a factor of 10x for large - uploads. - -- Hash: - . Added SSE2 and SHA-NI implementations of SHA-256. This improves the performance - on supported CPUs by ~1.3x (SSE2) and 3x - 5x (SHA-NI). - -- MBString: - . The performance of strspn() and strcspn() is greatly improved. - They now run in linear time instead of being bounded by quadratic time. - . mb_strcut() is much faster now for UTF-8 and UTF-16 strings. - . Looking up mbstring encoding names is much faster now. - . The performance of converting SJIS-win to unicode is greatly improved. - -- MySQLnd: - . Improved the performance of MySQLnd quoting. - -- PCRE: - . Improved the performance of named capture groups. - -- Random: - . Improved the performance of \Random\Randomizer, with a specific focus - on the getBytes() and getBytesFromString() methods. - -- SimpleXML: - . Improved performance and reduce memory consumption of XML serialization. - -- Standard: - . Improved the performance of strpbrk(). - . get_browser() is much faster now, up to 1.5x - 2.5x for some test cases. - diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 36096ebdd41..5f1647f8e45 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -1,4 +1,4 @@ -PHP 8.4 INTERNALS UPGRADE NOTES +PHP 8.5 INTERNALS UPGRADE NOTES 1. Internal API changes @@ -14,411 +14,18 @@ PHP 8.4 INTERNALS UPGRADE NOTES 1. Internal API changes ======================== -* zend_register_module_ex() now takes an additional int module_type argument. - This function will also assign the module number and type, there is no need - to do this at the call site anymore. Writing the handle should happen after - successful registration. - -* ZPP now accepts a F or Z_PARAM_FUNC_NO_TRAMPOLINE_FREE type check. - This is identical to the 'f' or Z_PARAM_FUNC type check, except the FCC is - always initialized because it doesn't free trampolines. - Trampolines MUST be freed using zend_release_fcall_info_cache() or consumed. - Z_PARAM_FUNC_EX2 was added as well with the same arguments as Z_PARAM_FUNC_EX - plus an additional argument free_trampoline. - -* The zend_object_iterator_funcs valid member has changed its signature from - int(*)(zend_object_iterator *) to zend_result(*)(zend_object_iterator *) to - be more in line with what callbacks are returning. - -* The backwards compatibility headers ext/standard/{php_lcg.h,php_mt_rand.h, - php_rand.h,php_random.h} have been removed. Include ext/random/php_random.h - directly. - -* The zend_*printf family of functions now supports the "%S" modifier to print - out zend_string*. This won't cut off the string if it embeds a NUL byte. - -* The inet_aton() and win32/inet.h have been removed. Use platform-agnostic - inet_pton() from arpa/inet.h or ws2tcpip.h on Windows. - -* zend_mm_set_custom_debug_handlers() has been removed from ZendMM, use - zend_mm_set_custom_handlers() instead which now supports DEBUG builds - -* zend_mm_set_custom_handlers() has changed its signature from - void()(zend_mm_heap *heap, - void* (*_malloc)(size_t), - void (*_free)(void*), - void* (*_realloc)(void*, size_t)) - to - void()(zend_mm_heap *heap, - void* (*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC), - void (*_free)(void* ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC), - void* (*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)) - -* zend_mm_get_custom_handlers() has changed its signature from - void()(zend_mm_heap *heap, - void* (**_malloc)(size_t), - void (**_free)(void*), - void* (**_realloc)(void*, size_t)) - to - void()(zend_mm_heap *heap, - void* (**_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC), - void (**_free)(void* ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC), - void* (**_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)) - -* Added gc and shutdown custom handlers, settable via - zend_mm_set_custom_handlers_ex() - -* __zend_malloc() has changed their signature from - void(*)(size_t) to - void(*)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) - -* __zend_calloc() has changed their signature from - void(*)(size_t, size_t) to - void(*)(size_t, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) - -* __zend_realloc() has changed their signature from - void(*)(void *, size_t) to - void(*)(void *, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) - -* zend_observer_remove_begin_handler() and zend_observer_remove_end_handler() - got each a new parameter returning an observer which must be called, if the - removal happened during observer execution. - -* zend_get_internal_function_extension_handle[s]() must now be used over - zend_get_op_array_extension_handle[s]() when registering run_time_cache slots - for internal functions. If you need a cache slot for both internal and user - functions, you may obtain a slot for each through the corresponding function. - -* zend_is_true now returns bool rather than int. Note that on PHP 8 this has - always returned 0 or 1, so conversion should be trivial. - -* Added zend_hash_get_current_pos_ex() variant of zend_hash_get_current_pos(). - -* Renamed rebuild_object_properties() to rebuild_object_properties_internal(). - This function should not be used outside of zend_std_get_properties_ex() and - zend_std_get_properties(). Use zend_std_get_properties_ex() or - zend_std_get_properties() instead. - -* zend_object.properties must not be accessed directly. Use - zend_std_get_properties_ex() instead. - -* Removed IS_STATIC_VAR_UNINITIALIZED constant. Check for IS_NULL in the - static_variables array instead. - -* Removed ZEND_DIM_ALTERNATIVE_SYNTAX constant. This syntax no longer has a - specialized error message. - ======================== 2. Build system changes ======================== - a. Abstract - - The configure option --with-imap has been removed. - - The configure option --with-mhash emits deprecation warning. - - The configure option --with-pdo-oci has been removed. - - The configure option --with-pspell has been removed. - - Symbol SIZEOF_SHORT removed (size of 2 on 32-bit and 64-bit platforms). - - Symbol DBA_CDB_MAKE removed in ext/dba. - - Symbol HAVE_LIBM has been removed. - - Symbol HAVE_INET_ATON has been removed. - - Symbol HAVE_SIGSETJMP has been removed. - - The Zend/zend_istdiostream.h header has been removed. - - b. Unix build system changes - - The configure option --with-imap-ssl has been removed. - - The configure option --with-oci8 has been removed. - - The configure option --with-zlib-dir has been removed. - - The configure option --with-kerberos has been removed. - - The configure option --with-openssl-dir has been removed. SSL support in - ext/ftp and ext/mysqlnd is enabled implicitly, when building with - ext/openssl (--with-openssl), or explicitly by using new configure options - --with-ftp-ssl and --with-mysqlnd-ssl. - - New configure option --with-openssl-legacy-provider to enable OpenSSL - legacy provider. - - New configure option --with-openssl-argon2 to enable PASSWORD_ARGON2 - from OpenSSL 3.2 - - COOKIE_IO_FUNCTIONS_T symbol has been removed (use cookie_io_functions_t). - - HAVE_SOCKADDR_UN_SUN_LEN symbol renamed to HAVE_STRUCT_SOCKADDR_UN_SUN_LEN. - - HAVE_UTSNAME_DOMAINNAME symbol renamed to HAVE_STRUCT_UTSNAME_DOMAINNAME. - - PHP_CHECK_IN_ADDR_T Autoconf macro and 'in_addr_t' fallback definition to - 'u_int' removed (use AC_CHECK_TYPES Autoconf macro instead). - - HAVE_ODBC2 symbol has been removed in ext/odbc. - - Removed linking with obsolete dnet_stub library in ext/pdo_dblib. - - Removed checking and linking with obsolete libbind for some functions. - - Symbol HAVE_JSON has been removed (ext/json is always available since PHP - 8.0). - - Symbol DARWIN has been removed (use __APPLE__ to target Darwin systems). - - Symbol MISSING_FCLOSE_DECL and Autoconf macro PHP_MISSING_FCLOSE_DECL were - removed. - - Symbol HAVE_BSD_ICONV has been removed. - - Symbol ZEND_FIBER_ASM has been removed. - - Symbols HAVE_DLOPEN and HAVE_DLSYM have been removed. - - Symbol HAVE_MYSQL has been removed. - - Symbol HAVE_PDO_SQLITELIB has been removed. - - Symbol HAVE_WAITPID has been removed. - - Symbol HAVE_LIBPQ has been removed. - - Symbols HAVE_LIBRT and HAVE_TIMER_CREATE removed. - - Symbols PHP_FPM_SYSTEMD, PHP_FPM_USER, and PHP_FPM_GROUP removed. - - Symbol PTHREADS has been removed. - - Symbol HAVE_STRPTIME_DECL_FAILS has been removed (use HAVE_DECL_STRPTIME). - - Symbol HAVE_PHPDBG has been removed. - - Symbols PHP_HAVE_AVX512_SUPPORTS and PHP_HAVE_AVX512_VBMI_SUPPORTS are now - either defined to 1 or undefined. - - Symbol HAVE_LIBCRYPT has been removed. - - Autoconf macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and - config.h). - - Autoconf macro PHP_WITH_SHARED has been removed (use PHP_ARG_WITH). - - Autoconf macro PHP_STRUCT_FLOCK has been removed (use AC_CHECK_TYPES). - - Autoconf macro PHP_SOCKADDR_CHECKS has been removed (use AC_CHECK_TYPES and - AC_CHECK_MEMBERS). - - Autoconf macro PHP_CHECK_GCC_ARG has been removed since PHP 8.0 (use - AX_CHECK_COMPILE_FLAG). - - Autoconf macro PHP_PROG_RE2C got a new 2nd argument to define common - default re2c command-line options substituted to the Makefile RE2C_FLAGS - variable. - - Autoconf macros PHP_CHECK_BUILTIN_* have been removed in favor of - PHP_CHECK_BUILTIN and all PHP_HAVE_BUILTIN_* symbols changed to be either - undefined or defined to 1 whether compiler supports the builtin. - - Added php-config --lib-dir and --lib-embed options for PHP embed SAPI. - - PDO extensions in php-src don't have the include flag -I$pdo_cv_inc_path - directory anymore. - - Autoconf macro PHP_SETUP_OPENSSL doesn't accept the 3rd argument anymore. - - Autoconf macro PHP_EVAL_LIBLINE got a new 3rd argument to override the - ext_shared checks. - - Autoconf macro PHP_SETUP_LIBXML doesn't define the redundant HAVE_LIBXML - symbol anymore and requires at least libxml2 2.9.4. - - Autoconf macro PHP_SETUP_ICONV doesn't define the HAVE_ICONV symbol - anymore. - - Autoconf macro PHP_AP_EXTRACT_VERSION is obsolete (use the - 'apxs -q HTTPD_VERSION'). - - Autoconf macro PHP_OUTPUT is obsolete (use AC_CONFIG_FILES). - - Autoconf macro PHP_TEST_BUILD is obsolete (use AC_* macros). - - Autoconf macro PHP_BUILD_THREAD_SAFE is obsolete (set enable_zts manually). - - Autoconf macro PHP_DEF_HAVE is obsolete (use AC_DEFINE). - - Autoconf macro PHP_PROG_SETUP now accepts an argument to set the minimum - required PHP version during the build. - - Autoconf macro PHP_INSTALL_HEADERS arguments can now be also - blank-or-newline-separated lists instead of only separated with whitespace - or backslash-then-newline. - - Autoconf macro PHP_ADD_BUILD_DIR now also accepts 1st argument as a - blank-or-newline-separated separated list. - - Autoconf macros PHP_NEW_EXTENSION, PHP_ADD_SOURCES, PHP_ADD_SOURCES_X, - PHP_SELECT_SAPI now have the source files and flags arguments normalized so - the list of items can be passed as a blank-or-newline-separated list. - - Autoconf macro PHP_ADD_INCLUDE now takes also a blank-or-newline-separated - list of include directories instead of a single directory. The "prepend" - argument is validated at Autoconf compile time. - - TSRM/tsrm.m4 file and its TSRM_CHECK_PTHREADS macro have been removed. - - Added pkg-config support to find libpq for the pdo_pgsql and pgsql - extensions. The libpq paths can be customized with the PGSQL_CFLAGS and - PGSQL_LIBS environment variables. When a directory argument is provided to - configure options (--with-pgsql=DIR or --with-pdo-pgsql=DIR), it will be - used instead of the pkg-config search. - - Added pkg-config support to find unixODBC and iODBC for the pdo_odbc - extension. - - Added pkg-config support to find GNU MP library. As a fallback default - system paths are searched. When a directory argument is provided - (--with-gmp=DIR), it will be used instead of the pkg-config. - - Added optional pkg-config support to find NET-SNMP library. As a fallback - net-snmp-config utility is used like before. - - Removed BC enable_pear variable check due to --enable-pear configure option - once used (use with_pear variable name). - - Cache variables synced to php_cv_* naming scheme. If you use them for - advanced cross-compilation, these were renamed: - - ac_cv_copy_file_range -> php_cv_func_copy_file_range - - ac_cv_flush_io -> php_cv_have_flush_io - - ac_cv_func_getaddrinfo -> php_cv_func_getaddrinfo - - ac_cv_have_broken_gcc_strlen_opt -> php_cv_have_broken_gcc_strlen_opt - - ac_cv_have_pcre2_jit -> php_cv_have_pcre2_jit - - ac_cv_pread -> php_cv_func_pread - - ac_cv_pwrite -> php_cv_func_pwrite - - ac_cv_syscall_shadow_stack_exists -> php_cv_have_shadow_stack_syscall - - ac_cv_time_r_type -> php_cv_time_r_type - - ac_cv_write_stdout -> php_cv_have_write_stdout - and all other checks wrapped with their belonging cache variables (see *.m4 - source files for details). - - c. Windows build system changes - - The configure options --with-oci8-11g, --with-oci8-12c, --with-oci8-19, - --enable-apache2-2handler have been removed. - - The configure option --enable-apache2-4handler is now an alias for the - preferred --enable-apache2handler. - - Added Bison flag '-Wall' when generating lexer files as done in *nix build - system. - - HAVE_WIN32_NATIVE_THREAD, USE_WIN32_NATIVE_THREAD, ENABLE_THREADS symbols - in ext/mbstring/libmbfl removed. - - FIBER_ASSEMBLER and FIBER_ASM_ARCH Makefile variables removed in favor of - PHP_ASSEMBLER and FIBER_ASM_ABI. - - HAVE_PHP_SOAP symbol renamed to HAVE_SOAP. - - Unused symbols CONFIGURATION_FILE_PATH, DISCARD_PATH, HAVE_ERRMSG_H, - HAVE_REGCOMP, HAVE_RINT, NEED_ISBLANK, PHP_URL_FOPEN, REGEX, HSREGEX, - USE_CONFIG_FILE have been removed. - - The HAVE_OPENSSL symbol has been removed. - - The HAVE_OPENSSL_EXT symbol is now consistently defined to value 1 whether - the openssl extension is available either as shared or built statically. - - Added configure option --enable-phpdbg-debug to build phpdbg in debug mode. - - The win32/build/libs_version.txt file has been removed. - - MSVC builds now use the new preprocessor (/Zc:preprocessor). - - The CHECK_HEADER_ADD_INCLUDE function now consistently defines preprocessor - macros HAVE_
_H either to value 1 or leaves them undefined to match - the Autotools headers checks. - ======================== 3. Module changes ======================== - a. ext/dom - - dom_read_t and dom_write_t now expect the function to return zend_result - instead of int. - - The macros DOM_NO_ARGS() and DOM_NOT_IMPLEMENTED() have been removed. - - New public APIs are available to handle callbacks from XPath, see - xpath_callbacks.h. - - Added public APIs to manipulate namespace data, see namespace_compat.h. - - php_dom_create_object() now no longer accepts a NULL obj argument. - - Removed the `ret` argument from the DOM_RET_OBJ macro, use the return - value instead. - - Removed DOM_XMLNS_NAMESPACE from xml_common.h. Use DOM_XMLNS_NS_URI - from namespace_compat.h instead. - - Added php_dom_get_ns_mapper(), php_dom_next_in_tree_order(), - php_dom_follow_spec_doc_ref(), and php_dom_follow_spec_doc_ref(). - - b. ext/random - - The macro RAND_RANGE_BADSCALING() has been removed. The implementation - should either be inlined and undefined behavior fixed or it should be - replaced by a non-biased scaler. - - The php_srand() and php_rand() functions have been removed. These were - slim wrappers around the corresponding php_mt_srand() and php_mt_rand() - function since PHP 7.1, but using zend_long instead of uint32_t as their - input/output types. This made their behavior incompatible between 32-bit - and 64-bit builds of PHP. Users of these functions are encouraged to - migrate to one of the more modern engines provided since PHP 8.2. If that - is not possible, due to backwards compatibility requirements, then the - php_mt_srand() and php_mt_rand() functions should be called directly and - the values appropriately casted. - - The PHP_RAND_MAX and RAND_MAX constants corresponding to the removed - php_rand() have also been removed. - - The generate member of a php_random_algo is now expected to return - the new php_random_result struct, replacing the last_generated_size - member of the php_random_status struct and the generate_size member of - the php_random_algo struct. - - The php_random_status struct has been removed, since the previous change - reduced it to a single void* member containing the actual state, resulting - in needless indirection. Functions taking a php_random_algo struct pointer - and a php_random_status struct pointer as separate parameters now take a - single php_random_algo_with_state struct by value, making it easier to - pass around the state with its associated algorithm and thus reducing - the chance for mistakes. - - The seed member of a php_random_algo has been removed. As a replacement - engine-specific seeding functions are now exposed. This change allows - users to better take engine-specific behavior into account. As an example - Mt19937 ignored the upper half of the seed parameter of the generic - seeding function. - - The CSPRNG API (php_random_(bytes|int)_*) is now provided by the new - and much smaller php_random_csprng.h header. The new header is included - in php_random.h for compatibility with existing users. - - A new php_random_generate_fallback_seed() function has been added as a - replacement for the generically named GENERATE_SEED(). The internal - implementation has been improved to generate better seeds, however any - users should use the opportunity to verify that seeding is first - attempted using the CSPRNG for better output size flexibility. - - The standalone combined_lcg engine has been removed, as the lcg_value() - userland function is deprecated and as the engine is unable to return - unbiased integer values. The internal php_combined_lcg() function remains - available for now. - - c. ext/xsl - - The function php_xsl_create_object() was removed as it was not used - nor exported. - - d. ext/libxml - - Added php_libxml_pretend_ctx_error_ex() to emit errors as if they had come - from libxml. - - Added php_libxml_error_handler_va() to pass libxml errors, and - corresponding php_libxml_error_level enum. - - Removed the "properties" HashTable field from php_libxml_node_object. - - Added a way to attached private data to a php_libxml_ref_obj. - - Added a way to fix a class type onto php_libxml_ref_obj. - - Added a way to record quirks mode in php_libxml_ref_obj. - - Added php_libxml_uses_internal_errors(). - - Added a way to override document handlers (e.g. serialization) with - php_libxml_document_handlers. - - Changed the refcount fields from int to unsigned int. - - e. ext/date - - Added the php_format_date_ex() API to format instances of php_date_obj. - - Added the php_date_initialize_from_ts_long() and - php_date_initialize_from_ts_double() to initialize a php_date_obj with - the given unix timestamp using GMT +00:00. - - f. ext/pcre - - php_pcre_match_impl() now no longer has a use_flags argument. - When flags should be ignored, pass 0 to the flags argument. - - php_pcre_match_impl() and pcre_get_compiled_regex_cache_ex() now use - proper boolean argument types instead of integer types. - - pcre_get_compiled_regex_cache_ex() now provides an option to collect extra - options (from modifiers used in the expression, for example), and calls - pcre2_set_compile_extra_options() with those options. - - Removed per-request cache, the cache is now always per process or - per thread depending on whether you use NTS or ZTS. - This was removed due to fundamental ordering issues between destructors. - - g. ext/standard - - Added the php_base64_encode_ex() API with flag parameters, value can be - PHP_BASE64_NO_PADDING to encode without the padding character '='. - - The php_escape_shell_cmd() now takes a zend_string* instead of a char* - Moreover, providing it with a binary safe string is the responsibility of - the caller now. - - The php_escape_shell_arg() now takes a zend_string* instead of a char* - Moreover, providing it with a binary safe string is the responsibility of - the caller now. - - The php_info_html_esc() function has been removed, use - php_escape_html_entities() with ENT_QUOTES directly instead. - - The deprecated php_uint32 and php_int32 typedefs have been removed from - ext/standard/basic_functions.h. Use the standard uint32_t and int32_t - types instead. - - The php_mkdir() and php_mkdir_ex() APIs have been removed, use - php_stream_mkdir() instead. - - The php_strtoupper(), php_string_toupper(), php_strtolower(), and - php_string_tolower() functions has been removed, use zend_str_toupper(), - zend_string_toupper(), zend_str_tolower(), and zend_string_tolower() - respectively instead. - - The php_replace_controlchars_ex() function is no longer exposed. - - h. ext/session - - Added the php_get_session_status() API to get the session status, which is - equivalent to reading PS(session_status) but works with shared objects too. - - Added the php_get_session_var_str() API to set a session variable without - needing to create a zend_string. - - The ext/session/php_session.h doesn't transitively include the - ext/hash/php_hash.h header anymore. - - i. ext/xml - - Made the expat compatibility wrapper XML_GetCurrentByteIndex return a long - instead of an int. This corresponds to the XML_Index type when - XML_LARGE_SIZE is not used in expat. - ======================== 4. OpCode changes ======================== -* DO_ICALL, DO_FCALL, and DO_FCALL_BY_NAME now call zend_interrupt_function - while the internal frame is still on the stack. This means interrupt handlers - will now see the internal call. If your interrupt handler does something like - switching EG(current_execute_data), it should not do so if an internal func - is on top. -* New FRAMELESS_ICALL_[0,3] opcodes for faster internal function calls have been - added. These opcodes don't create a stack frame, but pass arguments via opcode - operands. They only work for functions that are known at compile-time, and - that provide a frameless handler (search for usages of the - ZEND_FRAMELESS_FUNCTION macro). - -* CREATE_GENERATOR now initializes the generator with opline pointing to the - CREATE_GENERATOR op (before, opline was set to the next op). - -* YIELD and YIELD_FROM do not increment the opline anymore. - -* The EXIT opcode has been removed as exit is now implemented as a function. - ======================== 5. SAPI changes ======================== diff --git a/Zend/zend.h b/Zend/zend.h index b7dc8ae2f67..0cf1faeb653 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.4.0-dev" +#define ZEND_VERSION "4.5.0-dev" #define ZEND_ENGINE_3 diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index 15aaa14f915..becd53d7d08 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -44,7 +44,7 @@ You can use the following macro to check the extension API version for compatibi /* The first number is the engine version and the rest is the date (YYYYMMDD). * This way engine 2/3 API no. is always greater than engine 1 API no.. */ -#define ZEND_EXTENSION_API_NO 420230901 +#define ZEND_EXTENSION_API_NO 420240925 typedef struct _zend_extension_version_info { int zend_extension_api_no; diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h index f3f6ca82681..efc04a63bb3 100644 --- a/Zend/zend_modules.h +++ b/Zend/zend_modules.h @@ -31,7 +31,7 @@ #define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module #define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module -#define ZEND_MODULE_API_NO 20230901 +#define ZEND_MODULE_API_NO 20240925 #ifdef ZTS #define USING_ZTS 1 #else diff --git a/configure.ac b/configure.ac index 6b61df11ab4..56c22f1a80f 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.4.0-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.5.0-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php.h b/main/php.h index 2ab4c39de5b..f9d09204f2f 100644 --- a/main/php.h +++ b/main/php.h @@ -22,7 +22,7 @@ #include #endif -#define PHP_API_VERSION 20230901 +#define PHP_API_VERSION 20240925 #define PHP_HAVE_STREAMS #define YYDEBUG 0 #define PHP_DEFAULT_CHARSET "UTF-8" diff --git a/main/php_version.h b/main/php_version.h index 1cbfc9afcad..269397ba11e 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -1,8 +1,8 @@ /* automatically generated by configure */ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 -#define PHP_MINOR_VERSION 4 +#define PHP_MINOR_VERSION 5 #define PHP_RELEASE_VERSION 0 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.4.0-dev" -#define PHP_VERSION_ID 80400 +#define PHP_VERSION "8.5.0-dev" +#define PHP_VERSION_ID 80500 diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 2fba54c0b4d..db04d82af25 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -95,10 +95,10 @@ if (typeof(CWD) == "undefined") { if (!MODE_PHPIZE) { /* defaults; we pick up the precise versions from configure.ac */ var PHP_VERSION = 8; - var PHP_MINOR_VERSION = 4; + var PHP_MINOR_VERSION = 5; var PHP_RELEASE_VERSION = 0; var PHP_EXTRA_VERSION = ""; - var PHP_VERSION_STRING = "8.4.0"; + var PHP_VERSION_STRING = "8.5.0"; } /* Get version numbers and DEFINE as a string */