2022-08-30 23:17:15 +08:00
|
|
|
|
PHP 8.3 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
|
|
|
|
|
2022-12-17 01:14:22 +08:00
|
|
|
|
- Core:
|
|
|
|
|
. Programs that were very close to overflowing the call stack may now throw an
|
|
|
|
|
Error when using more than
|
|
|
|
|
`zend.max_allowed_stack_size-zend.reserved_stack_size` bytes of stack
|
|
|
|
|
(`fiber.stack_size-zend.reserved_stack_size` for fibers).
|
2022-10-21 04:57:03 +08:00
|
|
|
|
. Class constants can now be accessed dynamically using the C::{$name} syntax.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch
|
2022-12-17 01:14:22 +08:00
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
|
========================================
|
|
|
|
|
2. New Features
|
|
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
|
2022-10-21 02:53:39 +08:00
|
|
|
|
- Posix
|
|
|
|
|
. posix_getrlimit() now takes an optional $res parameter to allow fetching a
|
|
|
|
|
single resource limit.
|
2023-01-05 03:59:20 +08:00
|
|
|
|
. posix_isatty() now raises type warnings for integers following the usual ZPP semantics
|
|
|
|
|
. posix_ttyname() now raises type warnings for integers following the usual ZPP semantics
|
|
|
|
|
and value warnings for invalid file descriptor integers.
|
2022-10-21 02:53:39 +08:00
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2022-10-04 20:55:01 +08:00
|
|
|
|
- Core:
|
|
|
|
|
. gc_status() has added the following 4 fields:
|
|
|
|
|
"running" => bool
|
|
|
|
|
"protected" => bool
|
|
|
|
|
"full" => bool
|
|
|
|
|
"buffer_size" => int
|
|
|
|
|
See GH-9336
|
|
|
|
|
|
Implement Unicode conditional casing rules for Greek letter sigma
The capital Greek letter sigma (Σ) should be lowercased as σ except
when it appears at the end of a word; in that case, it should be
lowercased as the special form ς.
This rule is included in the Unicode data file SpecialCasing.txt.
The condition for applying the rule is called "Final_Sigma" and is
defined in Unicode technical report 21. The rule is:
• For the special casing form to apply, the capital letter sigma must
be preceded by 0 or more "case-ignorable" characters, preceded by
at least 1 "cased" character.
• Further, capital sigma must NOT be followed by 0 or more
case-ignorable characters and then at least 1 cased character.
"Case-ignorable" characters include certain punctuation marks, like
the apostrophe, as well as various accent marks. There are actually
close to 500 different case-ignorable characters, including accent marks
from Cyrillic, Hebrew, Armenian, Arabic, Syriac, Bengali, Gujarati,
Telugu, Tibetan, and many other alphabets. This category also includes
zero-width spaces, codepoints which indicate RTL/LTR text direction,
certain musical symbols, etc.
Since the rule involves scanning over "0 or more" of such
case-ignorable characters, it may be necessary to scan arbitrarily far
to the left and right of capital sigma to determine whether the special
lowercase form should be used or not. However, since we are trying to
be both memory-efficient and CPU-efficient, this implementation limits
how far to the left we will scan. Generally, we scan up to 63 characters
to the left looking for a "cased" character, but not more.
When scanning to the right, we go up to the end of the string if
necessary, even if it means scanning over thousands of characters.
Anyways, it is almost impossible to imagine that natural text will
include "words" with more than 63 successive apostrophes (for example)
followed by a capital sigma.
Closes GH-8096.
2023-01-08 02:27:59 +08:00
|
|
|
|
- MBString:
|
|
|
|
|
. mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional
|
|
|
|
|
casing rules for the Greek letter sigma. For mb_convert_case, conditional
|
|
|
|
|
casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to
|
|
|
|
|
MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. (Alex Dowad)
|
|
|
|
|
|
2022-11-16 02:36:38 +08:00
|
|
|
|
- Standard:
|
|
|
|
|
. E_NOTICEs emitted by unserialized() have been promoted to E_WARNING.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/improve_unserialize_error_handling
|
2023-01-21 00:06:00 +08:00
|
|
|
|
. array_pad() is now only limited by the maximum number of elements an array
|
|
|
|
|
can have. Before, it was only possible to add at most 1048576 elements at a
|
|
|
|
|
time.
|
2023-01-23 20:16:25 +08:00
|
|
|
|
. strtok() raises a warning in the case token is not provided when starting tokenization.
|
2023-01-24 01:35:16 +08:00
|
|
|
|
. password_hash() will now chain the underlying Random\RandomException
|
|
|
|
|
as the ValueError’s $previous Exception when salt generation fails.
|
2022-11-16 02:36:38 +08:00
|
|
|
|
|
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
|
|
|
|
|
2022-10-08 21:52:19 +08:00
|
|
|
|
- JSON:
|
|
|
|
|
. Added json_validate(), which returns whether the json is valid for
|
|
|
|
|
the given $depth and $options.
|
2022-12-10 00:55:32 +08:00
|
|
|
|
RFC: https://wiki.php.net/rfc/json_validate
|
2022-10-08 21:52:19 +08:00
|
|
|
|
|
2022-09-05 02:52:21 +08:00
|
|
|
|
- Posix:
|
2022-09-05 02:59:26 +08:00
|
|
|
|
. Added posix_sysconf call to get runtime informations.
|
2023-01-06 06:30:04 +08:00
|
|
|
|
. Added posix_pathconf call to get configuration value from a directory/file.
|
2023-01-07 16:34:56 +08:00
|
|
|
|
. Added posix_fpathconf call to get configuration value from a file descriptor.
|
2015-04-24 23:19:58 +08:00
|
|
|
|
|
2022-12-10 00:39:13 +08:00
|
|
|
|
- Random:
|
|
|
|
|
. Added Randomizer::getBytesFromString().
|
|
|
|
|
RFC: https://wiki.php.net/rfc/randomizer_additions
|
2022-12-15 00:48:47 +08:00
|
|
|
|
. Added Randomizer::nextFloat(), ::getFloat(), and IntervalBoundary.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/randomizer_additions
|
2023-01-21 06:35:08 +08:00
|
|
|
|
. Changed mt_srand() and srand() to not check the number of arguments to
|
|
|
|
|
determine whether a random seed should be used. Passing null will generate
|
|
|
|
|
a random seed, 0 will use zero as the seed. The functions are now consistent
|
|
|
|
|
with Mt19937::__construct().
|
2022-12-10 00:39:13 +08:00
|
|
|
|
|
2023-01-25 05:26:52 +08:00
|
|
|
|
- Reflection:
|
|
|
|
|
. Return type of ReflectionClass::getStaticProperties() is no longer nullable.
|
|
|
|
|
|
2022-10-29 03:08:46 +08:00
|
|
|
|
- Sockets:
|
|
|
|
|
. Added socket_atmark to checks if the socket is OOB marked.
|
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2022-11-12 03:15:58 +08:00
|
|
|
|
- PCNTL:
|
|
|
|
|
. SIGINFO
|
|
|
|
|
|
2022-09-05 02:52:21 +08:00
|
|
|
|
- Posix:
|
2022-09-05 02:59:26 +08:00
|
|
|
|
. POSIX_SC_ARG_MAX
|
|
|
|
|
. POSIX_SC_PAGESIZE
|
|
|
|
|
. POSIX_SC_NPROCESSORS_CONF
|
|
|
|
|
. POSIX_SC_NPROCESSORS_ONLN
|
2022-09-05 02:52:21 +08:00
|
|
|
|
|
2022-02-09 02:28:24 +08:00
|
|
|
|
- Sockets:
|
|
|
|
|
. SO_ATTACH_REUSEPORT_CBPF (Linux only).
|
2022-12-22 00:31:18 +08:00
|
|
|
|
. TCP_QUICKACK (Linux only).
|
2023-01-11 04:39:19 +08:00
|
|
|
|
. IP_DONTFRAG (FreeBSD only).
|
|
|
|
|
. IP_MTU_DISCOVER (Linux only).
|
|
|
|
|
. IP_PMTUDISC_DO (Linux only).
|
|
|
|
|
. IP_PMTUDISC_DONT (Linux only).
|
|
|
|
|
. IP_PMTUDISC_WANT (Linux only).
|
|
|
|
|
. IP_PMTUDISC_PROBE (Linux only).
|
|
|
|
|
. IP_PMTUDISC_INTERFACE (Linux only).
|
|
|
|
|
. IP_PMTUDISC_OMIT (Linux only).
|
2023-01-23 01:08:28 +08:00
|
|
|
|
. AF_DIVERT (FreeBSD only).
|
2022-02-09 02:28:24 +08:00
|
|
|
|
|
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
|
|
|
|
|
2022-12-17 01:14:22 +08:00
|
|
|
|
- zend.max_allowed_stack_size
|
|
|
|
|
. New INI directive to set the maximum allowed stack size. Possible
|
|
|
|
|
values are `0` (detect the process or thread maximum stack size), `-1`
|
|
|
|
|
(no limit), or a positive number of bytes. The default is `0`. When it
|
|
|
|
|
is not possible to detect the the process or thread maximum stack size,
|
|
|
|
|
a known system default is used. Setting this value too high has the same
|
|
|
|
|
effect as disabling the stack size limit. Fibers use fiber.stack_size
|
|
|
|
|
as maximum allowed stack size. An Error is thrown when the process call
|
|
|
|
|
stack exceeds `zend.max_allowed_stack_size-zend.reserved_stack_size`
|
|
|
|
|
bytes, to prevent stack-overflow-induced segmentation faults, with
|
|
|
|
|
the goal of making debugging easier. The stack size increases during
|
|
|
|
|
uncontrolled recursions involving internal functions or the magic methods
|
|
|
|
|
__toString, __clone, __sleep, __destruct. This is not related to stack
|
|
|
|
|
buffer overflows, and is not a security feature.
|
|
|
|
|
|
|
|
|
|
- zend.reserved_stack_size
|
|
|
|
|
. New INI directive to set the reserved stack size, in bytes. This is
|
|
|
|
|
subtracted from the max allowed stack size, as a buffer, when checking the
|
|
|
|
|
stack size.
|
|
|
|
|
|
2014-08-22 19:35:07 +08:00
|
|
|
|
========================================
|
|
|
|
|
12. Windows Support
|
|
|
|
|
========================================
|
|
|
|
|
|
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
|
|
|
|
|
2022-12-17 01:14:22 +08:00
|
|
|
|
- Core:
|
|
|
|
|
. An Error is now thrown when the process call stack exceeds a certain size,
|
|
|
|
|
to prevent stack-overflow-induced segmentation faults, with the goal of
|
|
|
|
|
making debugging easier. The maximum allowed stack size is controlled
|
|
|
|
|
by the INI directives zend.max_allowed_stack_size, zend.reserved_stack_size,
|
|
|
|
|
and fiber.stack_size.
|
|
|
|
|
|
2022-10-14 18:25:17 +08:00
|
|
|
|
- FFI:
|
|
|
|
|
. FFI::load() is now allowed during preloading when opcache.preload_user is the
|
|
|
|
|
current system user. Previously, calling FFI::load() was not possible during
|
|
|
|
|
preloading if the opcache.preload_user directive was set.
|
|
|
|
|
|
|
|
|
|
- Opcache:
|
|
|
|
|
. In the cli and phpdbg SAPIs, preloading does not require the
|
|
|
|
|
opcache.preload_user directive to be set anymore when running as root. In
|
|
|
|
|
other SAPIs, this directive is required when running as root because
|
|
|
|
|
preloading is done before the SAPI switches to an unprivileged user.
|
|
|
|
|
|
2022-10-05 21:31:28 +08:00
|
|
|
|
- Streams:
|
|
|
|
|
. Blocking fread() on socket connection returns immediately if there are
|
|
|
|
|
any buffered data instead of waiting for more data.
|
|
|
|
|
|
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
|
|
|
|
========================================
|