2024-09-24 23:03:39 +08:00
|
|
|
PHP 8.5 UPGRADE NOTES
|
2012-03-06 04:14:04 +08:00
|
|
|
|
|
|
|
1. Backward Incompatible Changes
|
|
|
|
2. New Features
|
2014-05-01 18:27:38 +08:00
|
|
|
3. Changes in SAPI modules
|
|
|
|
4. Deprecated Functionality
|
|
|
|
5. Changed Functions
|
|
|
|
6. New Functions
|
|
|
|
7. New Classes and Interfaces
|
2015-02-10 15:56:18 +08:00
|
|
|
8. Removed Extensions and SAPIs
|
2014-05-01 18:27:38 +08:00
|
|
|
9. Other Changes to Extensions
|
|
|
|
10. New Global Constants
|
|
|
|
11. Changes to INI File Handling
|
2014-08-22 19:35:07 +08:00
|
|
|
12. Windows Support
|
2019-01-28 17:34:31 +08:00
|
|
|
13. Other Changes
|
|
|
|
14. Performance Improvements
|
2010-03-25 00:23:50 +08:00
|
|
|
|
|
|
|
========================================
|
2012-03-06 04:14:04 +08:00
|
|
|
1. Backward Incompatible Changes
|
2010-03-25 00:23:50 +08:00
|
|
|
========================================
|
2016-04-25 05:49:52 +08:00
|
|
|
|
2024-09-29 05:38:53 +08:00
|
|
|
- BZ2:
|
|
|
|
. bzcompress() now throws a ValueError when $block_size is not between
|
|
|
|
1 and 9.
|
2024-10-07 14:49:04 +08:00
|
|
|
. bzcompress() now throws a ValueError when $work_factor is not between
|
2024-09-29 05:38:53 +08:00
|
|
|
0 and 250.
|
|
|
|
|
2024-11-03 01:52:10 +08:00
|
|
|
- Core:
|
|
|
|
. It is no longer possible to use "array" and "callable" as class alias names
|
|
|
|
in class_alias().
|
|
|
|
|
2024-09-28 07:33:53 +08:00
|
|
|
- LDAP:
|
|
|
|
. ldap_get_option() and ldap_set_option() now throw a ValueError when
|
|
|
|
passing an invalid option.
|
|
|
|
|
2024-09-06 18:31:06 +08:00
|
|
|
- SPL:
|
|
|
|
. ArrayObject no longer accepts enums, as modifying the $name or $value
|
|
|
|
properties can break engine assumptions.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
|
|
|
2. New Features
|
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2024-10-06 05:26:46 +08:00
|
|
|
- DOM:
|
|
|
|
. Added Dom\Element::$outerHTML.
|
|
|
|
|
2024-09-30 03:45:55 +08:00
|
|
|
- XSL:
|
|
|
|
. The $namespace argument of XSLTProcessor::getParameter(),
|
|
|
|
XSLTProcessor::setParameter() and XSLTProcessor::removeParameter()
|
|
|
|
now actually works instead of being treated as empty.
|
|
|
|
This only works if the $name argument does not use Clark notation
|
|
|
|
and is not a QName because in those cases the namespace is taken
|
|
|
|
from the namespace href or prefix respectively.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
3. Changes in SAPI modules
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
4. Deprecated Functionality
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2024-10-24 21:46:58 +08:00
|
|
|
- Hash:
|
|
|
|
The MHASH_* constants have been deprecated. These have been overlooked
|
|
|
|
when the mhash*() function family has been deprecated per
|
|
|
|
https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
5. Changed Functions
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-06-24 03:40:31 +08:00
|
|
|
|
2024-10-14 19:42:01 +08:00
|
|
|
- Zlib:
|
|
|
|
. The "use_include_path" argument for the
|
|
|
|
gzfile, gzopen and readgzfile functions had been changed
|
|
|
|
from int to boolean.
|
|
|
|
|
2024-09-15 15:57:18 +08:00
|
|
|
- PDO_PGSQL:
|
|
|
|
. PDO::pgsqlCopyFromArray also supports inputs as Iterable.
|
2024-09-04 04:43:58 +08:00
|
|
|
. Pdo\Pgsql::setAttribute and Pdo\Pgsql::prepare supports
|
|
|
|
PDO::ATTR_PREFETCH sets to 0 which set to lazy fetch mode.
|
|
|
|
In this mode, statements cannot be run parallely.
|
2024-09-15 15:57:18 +08:00
|
|
|
|
2024-09-30 04:28:40 +08:00
|
|
|
- PGSQL:
|
|
|
|
. pg_copy_from also supports inputs as Iterable.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
6. New Functions
|
2022-09-05 02:59:26 +08:00
|
|
|
========================================
|
2022-09-05 02:52:21 +08:00
|
|
|
|
2024-10-16 22:24:04 +08:00
|
|
|
- Curl:
|
|
|
|
. curl_multi_get_handles() allows retrieving all CurlHandles current
|
|
|
|
attached to a CurlMultiHandle. This includes both handles added using
|
|
|
|
curl_multi_add_handle() and handles accepted by CURLMOPT_PUSHFUNCTION.
|
|
|
|
|
2024-09-30 01:33:47 +08:00
|
|
|
- PGSQL:
|
2024-06-16 20:01:36 +08:00
|
|
|
. pg_close_stmt offers an alternative way to close a prepared
|
|
|
|
statement from the DEALLOCATE sql command in that we can reuse
|
|
|
|
its name afterwards.
|
|
|
|
|
2024-09-12 09:43:47 +08:00
|
|
|
- Reflection:
|
|
|
|
. ReflectionConstant::getFileName() was introduced.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
7. New Classes and Interfaces
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2015-02-10 15:56:18 +08:00
|
|
|
8. Removed Extensions and SAPIs
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
9. Other Changes to Extensions
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2016-07-03 18:43:30 +08:00
|
|
|
|
2024-10-26 00:35:48 +08:00
|
|
|
- Readline:
|
|
|
|
. The return types of readline_add_history(), readline_clear_history(), and
|
|
|
|
readline_callback_handler_install() have been changed to true, rather
|
|
|
|
than bool.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
10. New Global Constants
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2010-03-25 00:23:50 +08:00
|
|
|
|
2024-11-02 20:28:08 +08:00
|
|
|
- POSIX:
|
|
|
|
. POSIX_SC_OPEN_MAX.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
11. Changes to INI File Handling
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2010-08-30 17:38:47 +08:00
|
|
|
|
2014-08-22 19:35:07 +08:00
|
|
|
========================================
|
|
|
|
12. Windows Support
|
|
|
|
========================================
|
|
|
|
|
2024-10-05 21:16:49 +08:00
|
|
|
* The configuration variables PHP_VERSION, PHP_MINOR_VERSION, and
|
|
|
|
PHP_RELEASE_VERSION are now always numbers. Previously, they have been
|
|
|
|
strings for buildconf builds.
|
|
|
|
|
2024-10-11 23:50:15 +08:00
|
|
|
* FFI:
|
|
|
|
. It is no longer necessary to specify the library when using FFI::cdef()
|
|
|
|
and FFI::load(). However, this convenience feature should not be used in
|
|
|
|
production.
|
|
|
|
|
2019-01-15 17:13:39 +08:00
|
|
|
========================================
|
2019-01-28 17:34:31 +08:00
|
|
|
13. Other Changes
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2018-12-27 05:26:01 +08:00
|
|
|
|
|
|
|
========================================
|
2019-01-28 17:34:31 +08:00
|
|
|
14. Performance Improvements
|
2018-12-27 05:26:01 +08:00
|
|
|
========================================
|
2024-09-29 18:35:36 +08:00
|
|
|
|
|
|
|
- XMLWriter:
|
|
|
|
. Improved performance and reduce memory consumption.
|