1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Prepare for PHP 8.3

This commit is contained in:
Pierrick Charron
2022-08-30 11:17:15 -04:00
parent 853181a14d
commit 327c95237c
11 changed files with 15 additions and 950 deletions

View File

@@ -331,7 +331,8 @@ Currently we have the following branches in use:
| Branch | |
| --------- | --------- |
| master | Active development branch for PHP 8.2, which is open for backwards incompatible changes and major internal API changes. |
| master | Active development branch for PHP 8.3, which is open for backwards incompatible changes and major internal API changes. |
| 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 a current stable version and is open for bugfixes only. |
| PHP-8.0 | Is used to release the PHP 8.0.x series. This is a current stable version and is open for bugfixes only. |
| PHP-7.4 | Is used to release the PHP 7.4.x series. This is an old stable version and is open for security fixes only. |

382
NEWS
View File

@@ -1,386 +1,6 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.2.0RC1
?? ??? ????, PHP 8.3.0alpha1
- CLI:
. Implement built-in web server responding without body to HEAD request on
a static resource. (Vedran Miletic, Marin Martuslovic)
. Implement built-in web server responding with HTTP status 405 to
DELETE/PUT/PATCH request on a static resource.
(Vedran Miletic, Marin Martuslovic)
- Core:
. Fixed bug GH-9323 (Crash in ZEND_RETURN/GC/zend_call_function)
(Tim Starling)
. Fixed bug GH-9227 (Trailing dots and spaces in filenames are ignored).
(cmb)
. Fixed bug GH-9285 (Traits cannot be used in readonly classes).
(kocsismate)
. Fixed bug GH-9186 (@strict-properties can be bypassed using
unserialization). (kocsismate)
- Date:
. Fixed bug GH-9431 (DateTime::getLastErrors() not returning false when no
errors/warnings). (Derick)
- ODBC:
. Fixed bug GH-9347 (Current ODBC liveness checks may be inadequate). (Calvin
Buckley)
- Opcache:
. Fixed bug GH-9371 (Crash with JIT on mac arm64)
(jdp1024/David Carlier)
- OpenSSL:
. Fixed bug GH-9310 (SSL local_cert and local_pk do not respect
open_basedir). (Jakub Zelenka)
. Implement FR #76935 ("chacha20-poly1305" is an AEAD but does not work like
AEAD). (Jakub Zelenka)
. Added openssl_cipher_key_length function. (Jakub Zelenka)
- PDO_ODBC:
. Fixed bug GH-9347 (Current ODBC liveness checks may be inadequate). (Calvin
Buckley)
- Random:
. Fixed bug GH-9415 (Randomizer::getInt(0, 2**32 - 1) with Mt19937
always returns 1). (timwolla)
. Fixed Randomizer::getInt() consistency for 32-bit engines. (timwolla)
- Streams:
. Fixed bug GH-9316 ($http_response_header is wrong for long status line).
(cmb, timwolla)
- XML:
. Added libxml_get_external_entity_loader() function. (Tim Starling)
18 Aug 2022, PHP 8.2.0beta3
- Core:
. Fixed incorrect double to long casting in latest clang. (zeriyoshi)
. Added support for defining constants in traits. (sj-i)
. Stop incorrectly emitting false positive deprecation notice alongside
unsupported syntax fatal error for `"{$g{'h'}}"`. (TysonAndre)
. Fix unexpected deprecated dynamic property warning, which occurred when
exit() in finally block after an exception was thrown without catching.
(Twosee)
- MBString:
. Fixed bug GH-9248 (Segmentation fault in mb_strimwidth()). (cmb)
- Random:
. Fixed bug GH-9235 (non-existant $sequence parameter in stub for
PcgOneseq128XslRr64::__construct()). (timwolla)
. Fixed bug GH-9190, GH-9191 (undefined behavior for MT_RAND_PHP when
handling large ranges). (timwolla)
. Fixed bug GH-9249 (Xoshiro256StarStar does not reject the invalid
all-zero state). (timwolla)
. Removed redundant RuntimeExceptions from Randomizer methods. The
exceptions thrown by the engines will be exposed directly. (timwolla)
. Added extension specific Exceptions/Errors (RandomException, RandomError,
BrokenRandomEngineError). (timwolla)
- Session:
. Fixed GH-9200 (setcookie has an obsolete expires date format). (timwolla)
- Standard:
. Fixed bug #65489 (glob() basedir check is inconsistent). (Jakub Zelenka)
. Fixed GH-9200 (setcookie has an obsolete expires date format). (Derick)
. Fixed GH-9244 (Segfault with array_multisort + array_shift). (cmb)
. Fixed bug GH-9296 (`ksort` behaves incorrectly on arrays with mixed keys).
(Denis Vaksman)
04 Aug 2022, PHP 8.2.0beta2
- Core:
. Fixed bug GH-7900 (Arrow function with never return type compile-time
errors). (ilutov)
- Date:
. Fixed bug GH-8730 (DateTime::diff miscalculation is same time zone of
different type). (Derick)
. Fixed bug GH-8964 (DateTime object comparison after applying delta less
than 1 second). (Derick)
. Fixed bug GH-9106: (DateInterval 1.5s added to DateTimeInterface is rounded
down since PHP 8.1.0). (Derick)
. Fixed bug #75035 (Datetime fails to unserialize "extreme" dates).
(Derick)
. Fixed bug #80483 (DateTime Object with 5-digit year can't unserialized).
(Derick)
. Fixed bug #81263 (Wrong result from DateTimeImmutable::diff). (Derick)
- DBA:
. Fixed LMDB driver memory leak on DB creation failure (Girgias)
. Fixed GH-8856 (dba: lmdb: allow to override the MDB_NOSUBDIR flag). (Girgias)
- FFI:
. Fixed bug GH-9090 (Support assigning function pointers in FFI). (Adam
Saponara)
- Intl:
. Declared Transliterator::$id as readonly to unlock subclassing it. (Nicolas
Grekas)
- OPcache:
. Fixed bug GH-9164 (Segfault in zend_accel_class_hash_copy).
(Arnaud, Sergei Turchanov)
- PCNTL:
. Fixed pcntl_(get|set)priority error handling for MacOS. (Juan Morales)
- Random:
. Fixed bug GH-9067 (random extension is not thread safe). (cmb)
. Fixed bug GH-9055 (segmentation fault if user engine throws). (timwolla)
. Fixed bug GH-9066 (signed integer overflow). (zeriyoshi)
. Fixed bug GH-9083 (undefined behavior during shifting). (timwolla)
. Fixed bug GH-9088, GH-9056 (incorrect expansion of bytes when
generating uniform integers within a given range). (timwolla)
. Fixed bug GH-9089 (Fix memory leak on Randomizer::__construct()
call twice). (zeriyoshi)
. Fixed bug GH-9212 (PcgOneseq128XslRr64::jump() should not allow negative
$advance). (Anton Smirnov)
. Changed Mt19937 to throw a ValueError instead of InvalidArgumentException
for invalid $mode. (timwolla)
. Splitted Random\Randomizer::getInt() (without arguments) to
Random\Randomizer::nextInt(). (zeriyoshi)
- Sockets:
. Added SOL_FILTER socket option for Solaris. (David Carlier)
- SPL:
. Fixed bug #69181 (READ_CSV|DROP_NEW_LINE drops newlines within fields).
(cmb)
. Fixed bug #65069 (GlobIterator incorrect handling of open_basedir check).
(Jakub Zelenka)
21 Jul 2022, PHP 8.2.0beta1
- CLI:
. Updated the mime-type table for the builtin-server. (Ayesh Karunaratne)
. Fixed potential overflow for the builtin server via the
PHP_CLI_SERVER_WORKERS environment variable. (yiyuaner)
. Fixed GH-8575 by changing STDOUT, STDERR and STDIN to not close on resource
destruction. (Jakub Zelenka)
- Core:
. Reduced the memory footprint of strings returned by var_export(),
json_encode(), serialize(), iconv_*(), mb_ereg*(), session_create_id(),
http_build_query(), strstr(), Reflection*::__toString(). (Arnaud)
. Fixed bug GH-8995 (WeakMap object reference offset causing TypeError).
(Tobias Bachert)
. Added error_log_mode ini setting. (Mikhail Galanin)
. Updated request startup messages. (Eric Norris)
- COM:
. Fixed bug GH-8750 (Can not create VT_ERROR variant type). (cmb)
- Filter:
. Added FILTER_FLAG_GLOBAL_RANGE to filter Global IPs. (vnsavage)
- FPM:
. Added listen.setfib pool option to set route FIB on FreeBSD. (David Carlier)
. Added access.suppress_path pool option to filter access log entries.
(Mark Gallagher)
. Fixed on fpm scoreboard occasional warning on acquisition failure.
(Felix Wiedemann)
- Opcache:
. Added initial support for JIT performance profiling generation
for macOs Instrument. (David Carlier)
. Fixed bug GH-8030 (Segfault with JIT and large match/switch statements).
(Arnaud)
. Added JIT support improvement for macOs for segments and executable permission
bit handling. (David Carlier)
. Added JIT buffer allocation near the .text section on FreeNSD. (David Carlier)
- PCRE:
. Updated bundled libpcre to 10.40. (cmb)
- PDO_Firebird:
. Fixed bug GH-8576 (Bad interpretation of length when char is UTF-8). (cmb)
- Random:
. Added new random extension. (Go Kudo)
- SPL:
. Widen iterator_to_array() and iterator_count()'s $iterator parameter to
iterable. (timwolla)
- Standard:
. Implemented FR GH-8924 (str_split should return empty array for empty
string). (Michael Vorisek)
. Added ini_parse_quantity function to convert ini quantities shorthand
notation to int. (Dennis Snell)
. Enable arc4random_buf for Linux glibc 2.36 and onwards
for the random_bytes. (Cristian Rodriguez)
. Uses CCRandomGenerateBytes instead of arc4random_buf on macOs. (David Carlier).
- Windows:
. Added preliminary support for (cross-)building for ARM64. (Yun Dou)
07 Jul 2022, PHP 8.2.0alpha3
- Core:
. Uses safe_perealloc instead of perealloc for the
ZEND_PTR_STACK_RESIZE_IF_NEEDED to avoid possible overflows. (David Carlier)
- DBA:
. Fixed LMDB driver hanging when attempting to delete a non-existing key
(Girgias)
- Intl:
. Fixed build for ICU 69.x and onwards. (David Carlier)
- Opcache:
. Allocate JIT buffer close to PHP .text segemnt to allow using direct
IP-relative calls and jumps.
(Su Tao, Wang Xue, Chen Hu, Lizhen Lizhen, Dmitry)
- Sockets:
. Added TCP_CONGESTION socket option. (David Carlier)
. Added SO_ZEROCOPY/MSG_ZEROCOPY options. (David Carlier)
- SPL:
. Uses safe_erealloc instead of erealloc to handle heap growth
for the SplHeap::insert method to avoid possible overflows. (David Carlier)
- Standard:
. Fixed the crypt_sha256/512 api build with clang > 12. (David Carlier)
. Uses safe_erealloc instead of erealloc to handle options in getopt
to avoid possible overflows. (David Carlier)
- Zip:
. Implement fseek for zip stream when possible with libzip 1.9.1. (Remi)
23 Jun 2022, PHP 8.2.0alpha2
- Core:
. Fixed bug GH-8655 (Casting an object to array does not unwrap refcount=1
references). (Nicolas Grekas)
. Fixed bug GH-8661 (Nullsafe in coalesce triggers undefined variable
warning). (ilutov)
. Fixed bug GH-7821 and GH-8418 (Allow arbitrary const expressions in backed
enums). (ilutov)
. Fixed bug GH-8810 (Incorrect lineno in backtrace of multi-line function
calls). (ilutov)
. Optimised code path for newly created file with the stream plain wrapper. (Max Kellermann)
- Curl:
. Added new constants from cURL 7.62 to 7.80. (Pierrick)
. New function curl_upkeep(). (Pierrick)
- OpenSSL:
. Discard poll calls on socket when no timeout/non blocking/MSG_DONTWAIT. (Max Kellermann)
- PCRE:
. Implemented FR #77726 (Allow null character in regex patterns). (cmb)
- Standard:
. Deprecated utf8_encode() and utf8_decode(). (Rowan Tommins)
- Streams:
. Discard poll calls on socket when no timeout/non blocking/MSG_DONTWAIT. (Max Kellermann)
09 Jun 2022, PHP 8.2.0alpha1
- CLI:
. Fixed bug #81496 (Server logs incorrect request method). (lauri)
- Core:
. Fixed bug #81380 (Observer may not be initialized properly). (krakjoe)
. Fixed bug GH-7771 (Fix filename/lineno of constant expressions). (ilutov)
. Fixed bug GH-7792 (Improve class type in error messages). (ilutov)
. Support huge pages on MacOS. (David CARLIER)
- Curl:
. Added support for CURLOPT_XFERINFOFUNCTION. (David Carlier)
. Added support for CURLOPT_MAXFILESIZE_LARGE. (David Carlier)
- Date:
. Fixed GH-8458 (DateInterval::createFromDateString does not throw if
non-relative items are present). (Derick)
. Fixed bug #52015 (Allow including end date in DatePeriod iterations)
(Daniel Egeberg, Derick)
. idate() now accepts format specifiers "N" (ISO Day-of-Week) and "o" (ISO
Year). (Pavel Djundik)
- FPM:
. Emit error for invalid port setting. (David Carlier)
. Added extra check for FPM proc dumpable on SELinux based systems.
(David Carlier)
. Added support for listening queue on macOS. (David Carlier)
. Changed default for listen.backlog on Linux to -1. (Cristian Rodríguez)
- FTP:
. Fix datetime format string to follow POSIX spec in ftp_mdtm(). (Jihwan Kim)
- Intl:
. Update all grandfathered language tags with preferred values
. Fixed GH-7939 (Cannot unserialize IntlTimeZone objects). (cmb)
- OCI8:
. Added oci8.prefetch_lob_size directive to tune LOB query performance
. Support for building against Oracle Client libraries 10.1 and 10.2 has been
dropped. Oracle Client libraries 11.2 or newer are now required.
- ODBC:
. Fixed bug GH-8300 (User input not escaped when building connection string).
(Calvin Buckley)
- PDO_ODBC:
. Fixed bug #80909 (crash with persistent connections in PDO_ODBC). (Calvin
Buckley)
. Fixed bug GH-8300 (User input not escaped when building connection string).
(Calvin Buckley)
- Reflection:
. Added ReflectionFunction::isAnonymous(). (Nicolas Grekas)
. Added ReflectionMethod::hasPrototype(). (Ollie Read)
. Narrow ReflectionEnum::getBackingType() return type to ReflectionNamedType.
(SamMousa)
- Session:
. Fixed bug GH-7787 (Improve session write failure message for user error
handlers). (ilutov)
- Sockets:
. Added TCP_NOTSENT_LOWAT socket option. (David Carlier)
. Added SO_MEMINFO socket option. (David Carlier)
. Added SO_RTABLE socket option (OpenBSD), equivalent of SO_MARK (Linux).
(David Carlier)
. Added TCP_KEEPALIVE, TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT socket
options. (David Carlier)
. Added ancillary data support for FreeBSD. (David Carlier)
. Added ancillary data support for NetBSD. (David Carlier)
. Added SO_BPF_EXTENSIONS socket option. (David Carlier)
. Added SO_SETFIB socket option. (David Carlier)
- Sodium:
. Added sodium_crypto_stream_xchacha20_xor_ic(). (Scott)
- SQLite3:
. Changed sqlite3.defensive from PHP_INI_SYSTEM to PHP_INI_USER. (bohwaz)
- Standard:
. net_get_interfaces() also reports wireless network interfaces on Windows.
(Yurun)
. Finished AVIF support in getimagesize(). (Yannis Guyon)
. Fixed bug GH-7847 (stripos with large haystack has bad performance).
(ilutov)
. New function memory_reset_peak_usage(). (Patrick Allaert)
. Fixed parse_url(): can not recognize port without scheme. (pandaLIU)
- Streams:
. Set IP_BIND_ADDRESS_NO_PORT if available when connecting to remote host.
(Cristian Rodríguez)
. Fixed bug GH-8548 (stream_wrapper_unregister() leaks memory). (ilutov)
- Zip:
. add ZipArchive::clearError() method
. add ZipArchive::getStreamName() method
. add ZipArchive::getStreamIndex() method
. On Windows, the Zip extension is now built as shared library (DLL) by
default. (cmb)
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

480
UPGRADING
View File

@@ -1,4 +1,4 @@
PHP 8.2 UPGRADE NOTES
PHP 8.3 UPGRADE NOTES
1. Backward Incompatible Changes
2. New Features
@@ -19,122 +19,10 @@ PHP 8.2 UPGRADE NOTES
1. Backward Incompatible Changes
========================================
- Date:
. DateTime::createFromImmutable() now has a tentative return type of static,
previously it was DateTime.
. DateTimeImmutable::createFromMutable() now has a tentative return type of static,
previously it was DateTimeImmutable.
- ODBC:
. The ODBC extension now escapes the username and password for the case when
both a connection string and username/password are passed, and the string
must be appended to. Before, user values containing values needing escaping
could have created a malformed connection string, or injected values from
user-provided data. The escaping rules should be identical to the .NET BCL
DbConnectionOptions behaviour.
- PDO_ODBC:
. The PDO_ODBC extension also escapes the username and password when a
connection string is passed. See the change to the ODBC extension for
further details.
- Standard:
. glob() returns empty array if all paths are restricted by open_basedir.
Previously the error was returned but that behavior was not consistent and
did not work correctly for all patterns.
. strtolower() and strtoupper() are no longer locale-sensitive. They now
perform ASCII case conversion, as if the locale were "C". Use
mb_strtolower() if you want localized case conversion. Similarly, stristr,
stripos, strripos, lcfirst, ucfirst, ucwords, str_ireplace,
array_change_key_case and sorting with SORT_FLAG_CASE use ASCII case
conversion.
. str_split() returns an empty array for an empty string now. Previously it
returned an array with a single empty string entry. mb_str_split() is not
affected by this change since it was already behaving like that.
. ksort() and krsort() do numeric string comparison under SORT_REGULAR using
the standard PHP 8 rules now.
- SPL:
. The following methods now enforce their signature:
* SplFileInfo::_bad_state_ex()
* SplFileObject::getCsvControl()
* SplFileObject::fflush()
* SplFileObject::ftell()
* SplFileObject::fgetc()
* SplFileObject::fpassthru()
. SplFileObject::hasChildren() now has a tentative return type of false,
previously it was bool
. SplFileObject::getChildren() now has a tentative return type of null,
previously it was ?RecursiveIterator
. GlogIterator returns empty array if all paths are restricted by
open_basedir. Previously the error was returned but that behavior was not
consistent and did not work correctly.
========================================
2. New Features
========================================
- Core:
. Added the #[\SensitiveParameter] attribute to redact sensitive data in
backtraces.
RFC: https://wiki.php.net/rfc/redact_parameters_in_back_traces
. It is now possible to use null and false as standalone types.
RFC: https://wiki.php.net/rfc/null-false-standalone-types
. Added support for readonly classes.
RFC: https://wiki.php.net/rfc/readonly_classes
. Added support for true type.
RFC: https://wiki.php.net/rfc/true-type
. Added support for Disjoint Normal Form (DNF) types.
RFC: https://wiki.php.net/rfc/dnf_types
. Added error_log_mode ini setting that allows setting of permissions for
error log file.
. Added support for fetching properties of enums in constant expressions.
RFC: https://wiki.php.net/rfc/fetch_property_in_const_expressions
. Added support for defining constants in traits.
RFC: https://wiki.php.net/rfc/constants_in_traits
- Curl:
. Added CURLINFO_EFFECTIVE_METHOD option and returning the effective
HTTP method in curl_getinfo() return value.
. Exposed multiple new constants from libcurl 7.62 to 7.80.
. Added new function curl_upkeep() to perform any connection upkeep checks.
- DBA:
. The LMDB Driver now accepts the DBA_LMDB_USE_SUB_DIR or DBA_LMDB_NO_SUB_DIR
flags to determine if it should create a sub directory or not when creating
a database file.
- OCI8:
. Added an oci8.prefetch_lob_size directive and oci_set_prefetch_lob()
function to tune LOB query performance by reducing the number of
round-trips between PHP and Oracle Database when fetching LOBS. This is
usable with Oracle Database 12.2 or later.
- OpenSSL:
. Added AEAD support for chacha20-poly1305 algorithm.
- ODBC:
. Added odbc_connection_string_is_quoted, odbc_connection_string_should_quote,
and odbc_connection_string_quote. These are primarily used behind the scenes
in the ODBC and PDO_ODBC extensions, but is exposed to userland for easier
unit testing, and for user applications and libraries to perform quoting
themselves.
- PCRE:
. Added support for the "n" (NO_AUTO_CAPTURE) modifier, which makes simple
`(xyz)` groups non-capturing. Only named groups like `(?<name>xyz)` are
capturing. This only affects which groups are capturing, it is still
possible to use numbered subpattern references, and the matches array will
still contain numbered results.
- Random:
. New extension that organizes and consolidates existing implementations
related to random number generators. New, higher quality RNGs are available
and scope issues are eliminated.
RFC: https://wiki.php.net/rfc/rng_extension
RFC: https://wiki.php.net/rfc/random_extension_improvement
========================================
3. Changes in SAPI modules
========================================
@@ -143,119 +31,14 @@ PHP 8.2 UPGRADE NOTES
4. Deprecated Functionality
========================================
- Core:
. Creation of dynamic properties is deprecated, unless the class opts in by
using the #[AllowDynamicProperties] attribute. stdClass allows dynamic
properties. Usage of __get()/__set() is not affected by this change. A
dynamic properties deprecation warning can be addressed by:
- Declaring the property (preferred).
- Adding the #[AllowDynamicProperties] attribute to the class (which also
applies to all child classes).
- Using a WeakMap if you wish to associate additional data with an object
you do not own.
. Callables that are not accepted by the $callable() syntax (but are accepted
by call_user_func) are deprecated. In particular:
"self::method"
"parent::method"
"static::method"
["self", "method"]
["parent", "method"]
["static", "method"]
["Foo", "Bar::method"]
[new Foo, "Bar::method"]
This does not affect normal method callables like "A::method" or
["A", "method"].
RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables
RFC: https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices
. The "${var}" and "${expr}" style string interpolations are deprecated and
will be removed in PHP 9. Use "$var"/"{$var}" or "{${expr}}", respectively.
RFC: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
- Mbstring:
. Use of QPrint, Base64, Uuencode, and HTML-ENTITIES 'text encodings' is
deprecated for all Mbstring functions. Unlike all the other text
encodings supported by Mbstring, these do not encode a sequence of
Unicode codepoints, but rather a sequence of raw bytes. It is not
clear what the correct return values for most Mbstring functions should
be when one of these non-encodings is specified. Further, PHP has
separate, built-in implementations of all of them; for example, UUencoded
data can be handled using convert_uuencode/convert_uudecode.
- SPL:
. The SplFileInfo::_bad_state_ex() internal method has been deprecated.
- Standard:
. utf8_encode() and utf8_decode() have been deprecated.
========================================
5. Changed Functions
========================================
- Core
. str*cmp, str*pos, substr_compare functions, using binary safe string
comparison now return -1, 0 and 1.
- DBA
. dba_open() and dba_popen() now have the following enforced function signature
dba_open(string $path, string $mode, ?string $handler = null, int $permission = 0o644, int $map_size = 0, ?int $flags = null)
. dba_fetch()'s optional skip argument is now at the end in line with
PHP userland semantics its signature now is:
dba_fetch(string|array $key, $dba, int $skip = 0): string|false
The overloaded signature
dba_fetch(string|array $key, $skip, $dba): string|false
is still accepted, but it is recommended to use the new standard variant.
- Random
. random_bytes() and random_int() now throw \Random\RandomException on CSPRNG failure.
Previously a plain \Exception was thrown.
- SPL
. The $iterator parameter of iterator_to_array() and iterator_count() is
widened to iterable from Iterator, allowing arrays to be passed.
RFC: https://wiki.php.net/rfc/iterator_xyz_accept_array
========================================
6. New Functions
========================================
- Curl:
. curl_upkeep() (libcurl >= 7.62.0)
- mysqli:
. mysqli_execute_query()
- OpenSSL:
. openssl_cipher_key_length(): Returns a key length for the supplied
cipher.
- Reflection:
. ReflectionFunction::isAnonymous()
. ReflectionMethod::hasPrototype()
- Sodium:
. sodium_crypto_stream_xchacha20_xor_ic()
- Standard:
. The peak memory usage can now be reset to the current usage thanks to
memory_reset_peak_usage().
. ini_parse_quantity(): Parses "shorthand bytes" quantities returned by
ini_get(). The function is suitable for parsing quantities whose int value
is in the range [PHP_INT_MIN, PHP_INT_MAX].
Parsing and interpretation is consistent with ini_set() (see also the
"Changes to INI File Handling" section).
Caveats: Some ini settings may apply additional constraints to the resuling
int value, such as a smaller range, that will not be reflected by
ini_parse_quantity(). The `memory_limit` setting accepts values higher than
PHP_INT_MAX, than can not be parsed by ini_parse_quantity().
- XML:
. libxml_get_external_entity_loader()
========================================
7. New Classes and Interfaces
========================================
@@ -268,283 +51,22 @@ PHP 8.2 UPGRADE NOTES
9. Other Changes to Extensions
========================================
- Date:
. DatePeriod properties are now properly declared.
- Intl:
. IntlBreakIterator, IntlRuleBasedBreakIterator, IntlCodePointBreakIterator,
IntlPartsIterator, IntlCalendar, IntlCalendar, Collator, IntlIterator,
UConverter, IntlDateFormatter, IntlDatePatternGenerator, MessageFormatter,
ResourceBundle, Spoofchecker, IntlTimeZone and Transliterator instances are
no longer serializable. Previously, they could be serialized, but
unserialization yielded unusable objects or failed.
- mysqli:
. The support for libmysql has been removed. It's no longer possible to compile
mysqli with libmysql and all relevant functionality has been removed.
. The reconnect property of mysqli_driver has been removed. It was supported only by libmysql.
. The INI directive mysqli.reconnect has been removed.
. The constant MYSQLI_IS_MARIADB has been deprecated.
- OCI8:
. The minimum Oracle Client library version required is now 11.2.
- PCRE:
. NUL characters (\0) in pattern strings are now supported.
- Session:
. Trying to change the SameSite cookie INI setting while the session is
active or output has already been sent will now fail and emit a warning.
This aligns the behaviour with all other session INI settings.
- SQLite3:
. sqlite3.defensive is now PHP_INI_USER.
- Standard:
. getimagesize() now reports the actual image dimensions, bits and channels
of AVIF images. Previously, the dimensions have been reported as 0x0, and
bits and channels have not been reported at all.
- Tidy:
. tidy properties are now properly declared.
. tidyNode properties are now properly declared as readonly.
- Zip:
. extension updated to 1.20.0 with new methods:
ZipArchive::clearError, getStreamName and getStreamIndex
========================================
10. New Global Constants
========================================
- COM_DOTNET:
. DISP_E_PARAMNOTFOUND
. LOCALE_NEUTRAL
- Curl:
. CURLALTSVC_H1 (libcurl >= 7.64.1)
. CURLALTSVC_H2 (libcurl >= 7.64.1)
. CURLALTSVC_H3 (libcurl >= 7.64.1)
. CURLALTSVC_READONLYFILE (libcurl >= 7.64.1)
. CURLAUTH_AWS_SIGV4 (libcurl >= 7.75.0)
. CURLE_PROXY (libcurl >= 7.73.0)
. CURLFTPMETHOD_DEFAULT
. CURLHSTS_ENABLE (libcurl >= 7.74.0)
. CURLHSTS_READONLYFILE (libcurl >= 7.74.0)
. CURLINFO_PROXY_ERROR (libcurl >= 7.73.0)
. CURLINFO_REFERER (libcurl >= 7.76.0)
. CURLINFO_RETRY_AFTER (libcurl >= 7.66.0)
. CURLMOPT_MAX_CONCURRENT_STREAMS (libcurl >= 7.67.0)
. CURLOPT_ALTSVC_CTRL (libcurl >= 7.64.1)
. CURLOPT_ALTSVC (libcurl >= 7.64.1)
. CURLOPT_AWS_SIGV4 (libcurl >= 7.75.0)
. CURLOPT_CAINFO_BLOB (libcurl >= 7.77.0)
. CURLOPT_DOH_SSL_VERIFYHOST (libcurl >= 7.76.0)
. CURLOPT_DOH_SSL_VERIFYPEER (libcurl >= 7.76.0)
. CURLOPT_DOH_SSL_VERIFYSTATUS (libcurl >= 7.76.0)
. CURLOPT_HSTS_CTRL (libcurl >= 7.74.0)
. CURLOPT_HSTS (libcurl >= 7.74.0)
. CURLOPT_MAIL_RCPT_ALLLOWFAILS (libcurl >= 7.69.0)
. CURLOPT_MAXAGE_CONN (libcurl >= 7.65.0)
. CURLOPT_MAXFILESIZE_LARGE
. CURLOPT_MAXLIFETIME_CONN (libcurl >= 7.80.0)
. CURLOPT_PROXY_CAINFO_BLOB (libcurl >= 7.77.0)
. CURLOPT_SASL_AUTHZID (libcurl >= 7.66.0)
. CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 (libcurl >= 7.80.0)
. CURLOPT_SSL_EC_CURVES (libcurl >= 7.73.0)
. CURLOPT_UPKEEP_INTERVAL_MS (libcurl >= 7.62.0)
. CURLOPT_UPLOAD_BUFFERSIZE (libcurl >= 7.62.0)
. CURLOPT_XFERINFOFUNCTION (libcurl >= 7.32.0)
. CURLPROTO_MQTT (libcurl >= 7.71.0)
. CURLPX_BAD_ADDRESS_TYPE (libcurl >= 7.73.0)
. CURLPX_BAD_VERSION (libcurl >= 7.73.0)
. CURLPX_CLOSED (libcurl >= 7.73.0)
. CURLPX_GSSAPI (libcurl >= 7.73.0)
. CURLPX_GSSAPI_PERMSG (libcurl >= 7.73.0)
. CURLPX_GSSAPI_PROTECTION (libcurl >= 7.73.0)
. CURLPX_IDENTD_DIFFER (libcurl >= 7.73.0)
. CURLPX_IDENTD (libcurl >= 7.73.0)
. CURLPX_LONG_HOSTNAME (libcurl >= 7.73.0)
. CURLPX_LONG_PASSWD (libcurl >= 7.73.0)
. CURLPX_LONG_USER (libcurl >= 7.73.0)
. CURLPX_NO_AUTH (libcurl >= 7.73.0)
. CURLPX_OK (libcurl >= 7.73.0)
. CURLPX_RECV_ADDRESS (libcurl >= 7.73.0)
. CURLPX_RECV_AUTH (libcurl >= 7.73.0)
. CURLPX_RECV_CONNECT (libcurl >= 7.73.0)
. CURLPX_RECV_REQACK (libcurl >= 7.73.0)
. CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED (libcurl >= 7.73.0)
. CURLPX_REPLY_COMMAND_NOT_SUPPORTED (libcurl >= 7.73.0)
. CURLPX_REPLY_CONNECTION_REFUSED (libcurl >= 7.73.0)
. CURLPX_REPLY_GENERAL_SERVER_FAILURE (libcurl >= 7.73.0)
. CURLPX_REPLY_HOST_UNREACHABLE (libcurl >= 7.73.0)
. CURLPX_REPLY_NETWORK_UNREACHABLE (libcurl >= 7.73.0)
. CURLPX_REPLY_NOT_ALLOWED (libcurl >= 7.73.0)
. CURLPX_REPLY_TTL_EXPIRED (libcurl >= 7.73.0)
. CURLPX_REPLY_UNASSIGNED (libcurl >= 7.73.0)
. CURLPX_REQUEST_FAILED (libcurl >= 7.73.0)
. CURLPX_RESOLVE_HOST (libcurl >= 7.73.0)
. CURLPX_SEND_AUTH (libcurl >= 7.73.0)
. CURLPX_SEND_CONNECT (libcurl >= 7.73.0)
. CURLPX_SEND_REQUEST (libcurl >= 7.73.0)
. CURLPX_UNKNOWN_FAIL (libcurl >= 7.73.0)
. CURLPX_UNKNOWN_MODE (libcurl >= 7.73.0)
. CURLPX_USER_REJECTED (libcurl >= 7.73.0)
. CURLSSLOPT_AUTO_CLIENT_CERT (libcurl >= 7.77.0)
. CURLSSLOPT_NATIVE_CA (libcurl >= 7.71.0)
. CURLSSLOPT_NO_PARTIALCHAIN (libcurl >= 7.68.0)
. CURLSSLOPT_REVOKE_BEST_EFFORT (libcurl >= 7.70.0)
. CURL_VERSION_GSASL (libcurl >= 7.76.0)
. CURL_VERSION_HSTS (libcurl >= 7.74.0)
. CURL_VERSION_HTTP3 (libcurl >= 7.66.0)
. CURL_VERSION_UNICODE (libcurl >= 7.72.0)
. CURL_VERSION_ZSTD (libcurl >= 7.72.0)
- Filter
. FILTER_FLAG_GLOBAL_RANGE
- Sockets:
. SO_INCOMING_CPU
. SO_MEMINFO
. SO_RTABLE (OpenBSD)
. TCP_KEEPALIVE (MacOS)
. TCP_KEEPCNT (Linux, others)
. TCP_KEEPIDLE (Linux, others)
. TCP_KEEPINTVL (Linux, others)
. TCP_NOTSENT_LOWAT
. LOCAL_CREDS_PERSISTENT (FreeBSD)
. SCM_CREDS2 (FreeBSD)
. LOCAL_CREDS (NetBSD)
. SO_BPF_EXTENSIONS
. SO_SETFIB
. TCP_CONGESTION (Linux, FreeBSD)
. SO_ZEROCOPY (Linux)
. MSG_ZEROCOPY (Linux)
========================================
11. Changes to INI File Handling
========================================
- Parsing of some ill-formatted values will now trigger a warning when this was
silently ignored before. Interpretation of these values is not changed, for
backwards compatibility. This affects the following settings:
. bcmath.scale
. com.code_page
. default_socket_timeout
. fiber.stack_size
. hard_timeout
. intl.error_level
. ldap.max_links
. max_input_nesting_level
. max_input_vars
. mbstring.regex_retry_limit
. mbstring.regex_stack_limit
. mysqli.allow_local_infile
. mysqli.allow_persistent
. mysqli.default_port
. mysqli.max_links
. mysqli.max_persistent
. mysqli.reconnect
. mysqli.rollback_on_cached_plink
. mysqlnd.log_mask
. mysqlnd.mempool_default_size
. mysqlnd.net_read_buffer_size
. mysqlnd.net_read_timeout
. oci8.default_prefetch
. oci8.max_persistent
. oci8.persistent_timeout
. oci8.ping_interval
. oci8.prefetch_lob_size
. oci8.privileged_connect
. oci8.statement_cache_size
. odbc.allow_persistent
. odbc.check_persistent
. odbc.defaultbinmode
. odbc.default_cursortype
. odbc.defaultlrl
. odbc.max_links
. odbc.max_persistent
. opcache.consistency_checks
. opcache.file_update_protection
. opcache.force_restart_timeout
. opcache.interned_strings_buffer
. opcache.jit_bisect_limit
. opcache.jit_blacklist_root_trace
. opcache.jit_blacklist_side_trace
. opcache.jit_debug
. opcache.jit_hot_func
. opcache.jit_hot_loop
. opcache.jit_hot_return
. opcache.jit_hot_side_exit
. opcache.jit_max_exit_counters
. opcache.jit_max_loop_unrolls
. opcache.jit_max_polymorphic_calls
. opcache.jit_max_recursive_calls
. opcache.jit_max_recursive_returns
. opcache.jit_max_root_traces
. opcache.jit_max_side_traces
. opcache.log_verbosity_level
. opcache.max_file_size
. opcache.opt_debug_level
. opcache.optimization_level
. opcache.revalidate_freq
. output_buffering
. pcre.backtrack_limit
. pcre.recursion_limit
. pgsql.max_links
. pgsql.max_persistent
. post_max_size
. realpath_cache_size
. realpath_cache_ttl
. session.cache_expire
. session.cookie_lifetime
. session.gc_divisor
. session.gc_maxlifetime
. session.gc_probability
. soap.wsdl_cache_limit
. soap.wsdl_cache_ttl
. unserialize_max_depth
. upload_max_filesize
. user_ini.cache_ttl
. xmlrpc_error_number
. zend.assertions
. zlib.output_compression_level
========================================
12. Windows Support
========================================
- Core:
. Windows specific error messages are no longer localized, but instead in
English to better match PHP error messages.
. Preliminary and highly experimental support for building on ARM64 has been
added.
- OCI8:
. Since building against Oracle Client 10g is no longer supported anyway,
the configuration option --with-oci8 has been dropped. --with-oci8-11g,
--with-oci8-12c and --with-oci8-19 are still supported.
- Zip:
. The Zip extension upgraded to version 1.21.0
. The Zip extension is now built as shared library (DLL) by default.
========================================
13. Other Changes
========================================
- CLI:
. The STDOUT, STDERR and STDIN are no longer closed on resource destruction
which is mostly when the CLI finishes. It is however still possible to
explicitly close those streams using fclose and similar.
- Core:
. The iterable type is now a built-in compile time alias for array|Traversable.
Error messages relating to iterable will therefore now use array|Traversable.
Type Reflection is preserved for single iterable (and ?iterable) to produce
a ReflectionNamedType with name iterable, however usage of iterable in
union types will be converted to array|Traversable
========================================
14. Performance Improvements
========================================

View File

@@ -1,4 +1,4 @@
PHP 8.2 INTERNALS UPGRADE NOTES
PHP 8.3 INTERNALS UPGRADE NOTES
1. Internal API changes
@@ -14,96 +14,18 @@ PHP 8.2 INTERNALS UPGRADE NOTES
1. Internal API changes
========================
* Removed zend_binary_zval_str(n)casecmp() APIs. These were thin wrappers
around zend_binary_str(n)casecmp_l() -- rather than
zend_binary_str(n)casecmp() as one would expect. Call the appropriate
wrapped function directly instead.
* Removed the (ZEND_)WRONG_PARAM_COUNT_WITH_RETVAL() macros.
* php_stristr() no longer lowercases the haystack and needle as a side effect.
Call zend_str_tolower() yourself if necessary. You no longer need to copy
the haystack and needle before passing them to php_stristr().
* zend_register_module_ex() no longer copies the module entry.
* The main/php_stdint.h header has been removed.
Include the standard <inttypes.h> and/or <stdint.h> headers instead.
Replace usage of u_char by the standard C99 uint8_t type.
* A new ZEND_THREEWAY_COMPARE() macro has been introduced which does a
three-way comparison of two integers and returns -1, 0 or 1 if the LHS is
smaller, equal or larger than the RHS
* Deprecated zend_atoi() and zend_atol(). Use ZEND_STRTOL() for general purpose
string to long conversion, or a variant of zend_ini_parse_quantity() for
parsing ini quantities.
* The return types of the following object handlers has changed from int to zend_result
- zend_object_cast_t
- zend_object_count_elements_t
- zend_object_get_closure_t
- zend_object_do_operation_t
* Added a new zero_position argument to php_stream_fopen_from_fd_rel to reflect
if this a newly created file so the current file offset needs not to be checked.
* Added smart_str_trim_to_size(). The function trims the memory allocated for the
string. This can considerably reduce the memory footprint of strings smaller
than approximately 4096 bytes.
* smart_str_extract() and the spprintf family of functions now use
smart_str_trim_to_size() before returning the string.
* It is recommended to use smart_str_extract() or smart_str_trim_to_size() when
using the smart_str API.
* zend_is_callable_ex, and functions which call it such as zend_is_callable and
zend_fcall_info_init, will issue deprecation notices if passed values which
are deprecated (see main UPGRADING notes). To suppress the notice, e.g. to
avoid duplicates when processing the same value multiple times, pass or add
IS_CALLABLE_SUPPRESS_DEPRECATIONS to the check_flags parameter.
* Registered zend_observer_fcall_init handlers are now also called for internal functions.
* The pestrdup and pestrndup macros and zend_strndup function are now also infallible
for persistent strings, so checking for NULL is no longer necessary.
* The CHECK_NULL_PATH and CHECK_ZVAL_NULL_PATH macros are now wrappers using
the new inline functions: bool zend_str_has_nul_byte(const zend_string *str)
and zend_char_has_nul_byte(const char *s, size_t known_length)
========================
2. Build system changes
========================
* Unsupported libxml2 2.10.0 symbols are no longer exported on Windows.
* Identifier names for namespaced functions generated from stub files through
gen_stub.php have been changed. This requires that namespaced functions
should be declared via the PHP_FUNCTION macro by using the fully qualified
function name (whereas each part is separated by "_") instead of just the
function name itself.
========================
3. Module changes
========================
a. ext/standard
- The PHP APIs string_natural_compare_function_ex(),
string_natural_case_compare_function(), and string_natural_compare_function()
have been removed. They always returned SUCCESS and were a wrapper around
strnatcmp_ex(). Use strnatcmp_ex() directly instead.
- The PHP API php_fgetcsv() now returns a HashTable* instead of having an in-out
zval parameter.
It now returns NULL on an empty line instead of [null].
A new function php_bc_fgetcsv_empty_line() has been added to get a HashTable* which
represents [null].
b. ext/pdo
- pdo_raise_impl_error()'s parameter sqlstate has been changed from
const char * to pdo_error_type (aka char [6]).
========================
4. OpCode changes
========================
* The ZEND_INIT_FCALL opcode now asserts that the function exists in the symbol
table as the function's existence is checked at compile time.
For extensions modifying the function symbol table, setting
CG(compiler_options) |= ZEND_COMPILE_IGNORE_USER_FUNCTIONS | ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS;
will produce ZEND_INIT_FCALL_BY_NAME opcodes instead which check for the
existence of the function at runtime.
========================
5. SAPI changes
========================
* The signature of php_module_startup() has changed from
int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint32_t num_additional_modules)
to
zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_module)
as only one additional module was ever provided.

View File

@@ -20,7 +20,7 @@
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "4.2.0-dev"
#define ZEND_VERSION "4.3.0-dev"
#define ZEND_ENGINE_3

View File

@@ -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 420210903
#define ZEND_EXTENSION_API_NO 420220830
typedef struct _zend_extension_version_info {
int zend_extension_api_no;

View File

@@ -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 20210903
#define ZEND_MODULE_API_NO 20220830
#ifdef ZTS
#define USING_ZTS 1
#else

View File

@@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice.
dnl ----------------------------------------------------------------------------
AC_PREREQ([2.68])
AC_INIT([PHP],[8.2.0-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net])
AC_INIT([PHP],[8.3.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

View File

@@ -22,7 +22,7 @@
#include <dmalloc.h>
#endif
#define PHP_API_VERSION 20210903
#define PHP_API_VERSION 20220830
#define PHP_HAVE_STREAMS
#define YYDEBUG 0
#define PHP_DEFAULT_CHARSET "UTF-8"

View File

@@ -1,8 +1,8 @@
/* automatically generated by configure */
/* edit configure.ac to change version number */
#define PHP_MAJOR_VERSION 8
#define PHP_MINOR_VERSION 2
#define PHP_MINOR_VERSION 3
#define PHP_RELEASE_VERSION 0
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "8.2.0-dev"
#define PHP_VERSION_ID 80200
#define PHP_VERSION "8.3.0-dev"
#define PHP_VERSION_ID 80300

View File

@@ -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 = 2;
var PHP_MINOR_VERSION = 3;
var PHP_RELEASE_VERSION = 0;
var PHP_EXTRA_VERSION = "";
var PHP_VERSION_STRING = "8.2.0";
var PHP_VERSION_STRING = "8.3.0";
}
/* Get version numbers and DEFINE as a string */