php-src/UPGRADING
Máté Kocsis 1f05d6ef80
Fix GH-10292 make the default value of the first parame of srand() and mt_srand() nullable (#10380)
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2023-01-20 23:35:08 +01:00

193 lines
6.8 KiB
Plaintext

PHP 8.3 UPGRADE NOTES
1. Backward Incompatible Changes
2. New Features
3. Changes in SAPI modules
4. Deprecated Functionality
5. Changed Functions
6. New Functions
7. New Classes and Interfaces
8. Removed Extensions and SAPIs
9. Other Changes to Extensions
10. New Global Constants
11. Changes to INI File Handling
12. Windows Support
13. Other Changes
14. Performance Improvements
========================================
1. Backward Incompatible Changes
========================================
- 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).
========================================
2. New Features
========================================
- Posix
. posix_getrlimit() now takes an optional $res parameter to allow fetching a
single resource limit.
. 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.
========================================
3. Changes in SAPI modules
========================================
========================================
4. Deprecated Functionality
========================================
========================================
5. Changed Functions
========================================
- Core:
. gc_status() has added the following 4 fields:
"running" => bool
"protected" => bool
"full" => bool
"buffer_size" => int
See GH-9336
- 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)
- Standard:
. E_NOTICEs emitted by unserialized() have been promoted to E_WARNING.
RFC: https://wiki.php.net/rfc/improve_unserialize_error_handling
. 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.
========================================
6. New Functions
========================================
- JSON:
. Added json_validate(), which returns whether the json is valid for
the given $depth and $options.
RFC: https://wiki.php.net/rfc/json_validate
- Posix:
. Added posix_sysconf call to get runtime informations.
. Added posix_pathconf call to get configuration value from a directory/file.
. Added posix_fpathconf call to get configuration value from a file descriptor.
- Random:
. Added Randomizer::getBytesFromString().
RFC: https://wiki.php.net/rfc/randomizer_additions
. Added Randomizer::nextFloat(), ::getFloat(), and IntervalBoundary.
RFC: https://wiki.php.net/rfc/randomizer_additions
. 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().
- Sockets:
. Added socket_atmark to checks if the socket is OOB marked.
========================================
7. New Classes and Interfaces
========================================
========================================
8. Removed Extensions and SAPIs
========================================
========================================
9. Other Changes to Extensions
========================================
========================================
10. New Global Constants
========================================
- PCNTL:
. SIGINFO
- Posix:
. POSIX_SC_ARG_MAX
. POSIX_SC_PAGESIZE
. POSIX_SC_NPROCESSORS_CONF
. POSIX_SC_NPROCESSORS_ONLN
- Sockets:
. SO_ATTACH_REUSEPORT_CBPF (Linux only).
. TCP_QUICKACK (Linux only).
. 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).
========================================
11. Changes to INI File Handling
========================================
- 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.
========================================
12. Windows Support
========================================
========================================
13. Other Changes
========================================
- 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.
- 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.
- Streams:
. Blocking fread() on socket connection returns immediately if there are
any buffered data instead of waiting for more data.
========================================
14. Performance Improvements
========================================