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).
|
2023-01-07 04:47:22 +08:00
|
|
|
|
. Executing proc_get_status() multiple times will now always return the right
|
|
|
|
|
value on posix systems. Previously, only the first call of the function
|
2023-08-28 18:40:03 +08:00
|
|
|
|
returned the right value. Executing proc_close() after proc_get_status()
|
|
|
|
|
will now also return the right exit code. Previously this would return -1.
|
2023-01-07 04:47:22 +08:00
|
|
|
|
Internally, this works by caching the result on posix systems. If you want
|
|
|
|
|
the old behaviour, you can check the "cached" key in the array returned by
|
|
|
|
|
proc_get_status() to check whether the result was cached.
|
2023-03-10 23:22:42 +08:00
|
|
|
|
. Zend Max Execution Timers is now enabled by default for ZTS builds on
|
|
|
|
|
Linux.
|
2023-03-26 01:34:06 +08:00
|
|
|
|
. Uses of traits with static properties will now redeclare static properties
|
2023-08-28 18:40:03 +08:00
|
|
|
|
inherited from the parent class. This will create a separate static
|
|
|
|
|
property storage for the current class. This is analogous to adding the
|
|
|
|
|
static property to the class directly without traits.
|
2023-04-28 23:12:31 +08:00
|
|
|
|
. Assigning a negative index n to an empty array will now make sure that the
|
|
|
|
|
next index is n+1 instead of 0.
|
2023-07-12 20:02:08 +08:00
|
|
|
|
. Class constant visibility variance is now correctly checked when inherited
|
|
|
|
|
from interfaces.
|
2023-08-28 18:40:03 +08:00
|
|
|
|
. WeakMaps entries whose key maps to itself (possibly transitively) may now
|
|
|
|
|
be removed during cycle collection if the key is not reachable except by
|
2023-07-16 19:42:35 +08:00
|
|
|
|
iterating over the WeakMap (reachability via iteration is considered weak).
|
|
|
|
|
Previously, such entries would never be automatically removed.
|
2022-12-17 01:14:22 +08:00
|
|
|
|
|
2023-08-08 02:46:39 +08:00
|
|
|
|
- DOM:
|
|
|
|
|
. DOMChildNode::after(), DOMChildNode::before(), DOMChildNode::replaceWith()
|
2023-08-28 18:40:03 +08:00
|
|
|
|
on a node that has no parent is now a no-op instead of a hierarchy
|
|
|
|
|
exception, which is the behaviour spec demands.
|
|
|
|
|
. Using the DOMParentNode and DOMChildNode methods without a document now
|
|
|
|
|
works instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in
|
|
|
|
|
line with the behaviour spec demands.
|
|
|
|
|
. createAttributeNS() without specifying a prefix would incorrectly create
|
|
|
|
|
a default namespace, placing the element inside the namespace instead of
|
|
|
|
|
the attribute. This bug is now fixed.
|
|
|
|
|
. createAttributeNS() would previously incorrectly throw a NAMESPACE_ERR
|
|
|
|
|
when the prefix was already used for a different uri. It now correctly
|
|
|
|
|
chooses a different prefix when there's a prefix name conflict.
|
2023-09-07 00:01:02 +08:00
|
|
|
|
. New methods and properties were added to some DOM classes. If you inherit
|
|
|
|
|
from these and you happen to have a method or property with the same name,
|
|
|
|
|
you might encounter errors if the declaration is incompatible.
|
|
|
|
|
Consult sections 2. New Features and 6. New Functions for a list of
|
|
|
|
|
newly implemented methods and properties.
|
2023-08-08 02:46:39 +08:00
|
|
|
|
|
2023-02-20 21:52:30 +08:00
|
|
|
|
- FFI:
|
|
|
|
|
. C functions that have a return type of void now return null instead of
|
|
|
|
|
returning the following object object(FFI\CData:void) { }
|
|
|
|
|
|
2023-07-31 21:09:06 +08:00
|
|
|
|
- Opcache:
|
|
|
|
|
. The opcache.consistency_checks INI directive was removed. This feature was
|
2023-08-28 18:40:03 +08:00
|
|
|
|
broken with the tracing JIT, as well as with inheritance cache, and has
|
|
|
|
|
been disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5.
|
|
|
|
|
Both the tracing JIT and inheritance cache may modify shm after the script
|
|
|
|
|
has been persisted by invalidating its checksum. The attempted fix skipped
|
|
|
|
|
over the modifiable pointers but was rejected due to complexity. For this
|
|
|
|
|
reason, it was decided to remove the feature instead.
|
2023-07-31 21:09:06 +08:00
|
|
|
|
|
2023-08-21 13:14:45 +08:00
|
|
|
|
- Phar:
|
|
|
|
|
. The type of Phar class constants are now declared.
|
|
|
|
|
|
2023-06-19 21:25:26 +08:00
|
|
|
|
- Standard:
|
|
|
|
|
. The range() function has had various changes:
|
|
|
|
|
* A TypeError is now thrown when passing objects, resources, or arrays
|
|
|
|
|
as the boundary inputs
|
|
|
|
|
* A more descriptive ValueError is thrown when passing 0 for $step
|
|
|
|
|
* A ValueError is now thrown when using a negative $step for increasing ranges
|
|
|
|
|
* If $step is a float that can be interpreted as an int, it is now done so
|
|
|
|
|
* A ValueError is now thrown if any argument is infinity or NAN
|
|
|
|
|
* An E_WARNING is now emitted if $start or $end is the empty string.
|
|
|
|
|
The value continues to be cast to the value 0.
|
|
|
|
|
* An E_WARNING is now emitted if $start or $end has more than one byte,
|
|
|
|
|
only if it is a non-numeric string.
|
|
|
|
|
* An E_WARNING is now emitted if $start or $end is cast to an integer
|
|
|
|
|
because the other boundary input is a number. (e.g. range(5, 'z');)
|
|
|
|
|
* An E_WARNING is now emitted if $step is a float when trying to generate
|
|
|
|
|
a range of characters, except if both boundary inputs are numeric strings
|
|
|
|
|
(e.g. range('5', '9', 0.5); does not produce a warning)
|
|
|
|
|
* range() now produce a list of characters if one of the boundary inputs is
|
|
|
|
|
a string digit instead of casting the other input to int
|
|
|
|
|
(e.g. range('5', 'z');)
|
2023-06-20 00:46:05 +08:00
|
|
|
|
. The file() flags error check now catches all invalid flags. Notably
|
|
|
|
|
FILE_APPEND was previously silently accepted.
|
2023-06-19 21:25:26 +08:00
|
|
|
|
|
2023-07-18 19:54:54 +08:00
|
|
|
|
- SNMP:
|
|
|
|
|
. The type of SNMP class constants are now declared.
|
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
|
========================================
|
|
|
|
|
2. New Features
|
|
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
|
2023-01-20 04:49:19 +08:00
|
|
|
|
- Core
|
|
|
|
|
. Anonymous classes may now be marked as readonly.
|
2023-04-04 04:07:36 +08:00
|
|
|
|
. Readonly properties can now be reinitialized during cloning.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/readonly_amendments
|
2023-04-17 04:20:26 +08:00
|
|
|
|
. Class, interface, trait, and enum constants now support type
|
|
|
|
|
declarations. RFC: https://wiki.php.net/rfc/typed_class_constants
|
2023-06-04 02:15:23 +08:00
|
|
|
|
. Closures created from magic methods can now accept named arguments.
|
2023-06-08 05:53:21 +08:00
|
|
|
|
. The final modifier may now be used when using a method from a trait.
|
2023-06-30 02:23:53 +08:00
|
|
|
|
. Added the #[\Override] attribute to check that a method exists
|
|
|
|
|
in a parent class or implemented interface.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/marking_overriden_methods
|
2023-08-28 18:40:03 +08:00
|
|
|
|
. Class constants can now be accessed dynamically using the C::{$name}
|
|
|
|
|
syntax.
|
2023-08-01 22:22:29 +08:00
|
|
|
|
RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch
|
|
|
|
|
. Static variable initializers can now contain arbitrary expressions.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers
|
2023-01-20 04:49:19 +08:00
|
|
|
|
|
2023-02-26 22:06:35 +08:00
|
|
|
|
- CLI
|
|
|
|
|
. It is now possible to lint multiple files.
|
|
|
|
|
|
2023-09-07 00:01:02 +08:00
|
|
|
|
- DOM
|
|
|
|
|
. Added properties DOMElement::className and DOMElement::id.
|
|
|
|
|
These are not binary-safe at the moment because of underlying limitations of
|
|
|
|
|
libxml2. This means that the property values will be cut off at a NUL byte.
|
2023-09-23 05:55:23 +08:00
|
|
|
|
. Added properties DOMNode::isConnected and DOMNameSpaceNode::isConnected.
|
|
|
|
|
. Added properties DOMNode::parentElement and DOMNameSpaceNode::parentElement.
|
2023-09-07 00:01:02 +08:00
|
|
|
|
|
2023-08-11 06:51:48 +08:00
|
|
|
|
- FFI
|
|
|
|
|
. It is now possible to assign CData to other CData. This means you can
|
|
|
|
|
now assign CData to structs and fields.
|
|
|
|
|
|
2023-07-29 02:01:12 +08:00
|
|
|
|
- Opcache
|
|
|
|
|
. opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix
|
|
|
|
|
timestamp of when the next revalidation of the scripts timestamp is due,
|
|
|
|
|
dictated by the opcache.revalidate_freq INI directive.
|
|
|
|
|
|
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-08-28 18:40:03 +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
|
|
|
|
|
2023-02-04 09:12:49 +08:00
|
|
|
|
- Streams
|
2023-08-28 18:40:03 +08:00
|
|
|
|
. Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was
|
|
|
|
|
previously not implemented.
|
2023-02-04 09:12:49 +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
|
|
|
|
|
2023-08-28 18:40:03 +08:00
|
|
|
|
- $_SERVER['SERVER_SOFTWARE'] value from the built-in CLI server changed to
|
|
|
|
|
make it compliant with RFC3875.
|
2023-05-05 19:43:34 +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
|
|
|
|
|
2023-07-17 22:51:24 +08:00
|
|
|
|
- Core
|
|
|
|
|
. Using the ++ operator on empty, non-numeric, or non-alphanumeric strings
|
|
|
|
|
is now deprecated. Moreover, incrementing non-numeric strings is soft
|
|
|
|
|
deprecated and the new str_increment() function should be used instead.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/saner-inc-dec-operators
|
|
|
|
|
. Using the -- operator on empty or non-numeric strings is now deprecated.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/saner-inc-dec-operators
|
2023-07-18 20:07:01 +08:00
|
|
|
|
. Calling get_class() and get_parent_class() without arguments is now
|
|
|
|
|
deprecated.
|
|
|
|
|
|
|
|
|
|
- DBA
|
|
|
|
|
. Calling dba_fetch() with $dba as the 3rd argument is now deprecated.
|
|
|
|
|
|
|
|
|
|
- FFI
|
|
|
|
|
. Calling FFI::cast(), FFI::new(), and FFI::type() statically is now
|
|
|
|
|
deprecated.
|
2023-07-17 22:51:24 +08:00
|
|
|
|
|
2023-03-30 23:29:31 +08:00
|
|
|
|
- Intl
|
2023-04-29 18:44:33 +08:00
|
|
|
|
. The U_MULTIPLE_DECIMAL_SEP*E*RATORS constant had been deprecated, using
|
|
|
|
|
the U_MULTIPLE_DECIMAL_SEP*A*RATORS instead is recommended.
|
2023-07-18 20:07:01 +08:00
|
|
|
|
. The NumberFormatter::TYPE_CURRENCY has been deprecated.
|
2023-03-30 23:29:31 +08:00
|
|
|
|
|
2023-07-11 23:34:38 +08:00
|
|
|
|
- LDAP
|
|
|
|
|
. Calling ldap_connect() with separate hostname and port is deprecated.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/deprecations_php_8_3#deprecate_calling_ldap_connect_with_2_parameters
|
|
|
|
|
|
2023-07-18 20:07:01 +08:00
|
|
|
|
- MBString
|
|
|
|
|
. Passing a negative $width to mb_strimwidth() is now deprecated.
|
|
|
|
|
|
|
|
|
|
- Phar
|
|
|
|
|
. Calling Phar::setStub() with a resource and a length is now deprecated.
|
|
|
|
|
Such calls should be replaced by:
|
|
|
|
|
$phar->setStub(stream_get_contents($resource));
|
|
|
|
|
|
2023-07-07 18:16:48 +08:00
|
|
|
|
- Random
|
|
|
|
|
. The MT_RAND_PHP Mt19937 variant is deprecated.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/deprecations_php_8_3#mt_rand_php
|
|
|
|
|
|
2023-07-13 22:45:32 +08:00
|
|
|
|
- Standard:
|
2023-08-01 22:54:09 +08:00
|
|
|
|
. The assert_options() function is now deprecated.
|
|
|
|
|
. The ASSERT_ACTIVE, ASSERT_BAIL, ASSERT_CALLBACK, ASSERT_EXCEPTION, and
|
2023-07-13 22:45:32 +08:00
|
|
|
|
ASSERT_WARNING constants have been deprecated.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/assert-string-eval-cleanup
|
|
|
|
|
|
2023-07-03 21:30:52 +08:00
|
|
|
|
- SQLite3
|
|
|
|
|
. Using exceptions is now preferred, warnings will be removed in the future.
|
2023-08-28 18:40:03 +08:00
|
|
|
|
Calling SQLite3::enableExceptions(false) will trigger a depreciation
|
|
|
|
|
warning in this version.
|
2023-07-03 21:30:52 +08:00
|
|
|
|
|
2023-07-07 18:14:39 +08:00
|
|
|
|
- Zip:
|
|
|
|
|
. The ZipArchive::FL_RECOMPRESS constant is deprecated and will be removed
|
|
|
|
|
in a future version of libzip
|
|
|
|
|
|
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:
|
2023-07-16 18:34:28 +08:00
|
|
|
|
. gc_status() has added the following 8 fields:
|
2022-10-04 20:55:01 +08:00
|
|
|
|
"running" => bool
|
|
|
|
|
"protected" => bool
|
|
|
|
|
"full" => bool
|
|
|
|
|
"buffer_size" => int
|
2023-07-16 18:34:28 +08:00
|
|
|
|
"application_time" => float: Total application time, in seconds (including
|
|
|
|
|
collector_time)
|
|
|
|
|
"collector_time" => float: Time spent collecting cycles, in seconds
|
|
|
|
|
(including destructor_time and free_time)
|
|
|
|
|
"destructor_time" => float: Time spent executing destructors during
|
|
|
|
|
cycle collection, in seconds
|
|
|
|
|
"free_time" => float: Time spent freeing values during cycle collection, in
|
|
|
|
|
seconds
|
|
|
|
|
See GH-9336, GH-11523
|
2023-02-22 18:47:32 +08:00
|
|
|
|
. class_alias() now supports creating an alias of an internal class.
|
2023-03-23 21:35:50 +08:00
|
|
|
|
. Setting `open_basedir` at runtime using `ini_set('open_basedir', ...);` no
|
|
|
|
|
longer accepts paths containing the parent directory (`..`). Previously,
|
|
|
|
|
only paths starting with `..` were disallowed. This could easily be
|
|
|
|
|
circumvented by prepending `./` to the path.
|
2023-03-22 03:41:18 +08:00
|
|
|
|
. User exception handlers now catch exceptions during shutdown.
|
2023-08-12 03:39:24 +08:00
|
|
|
|
. The resultant HTML of highlight_string and highlight_file has changed.
|
|
|
|
|
Whitespace between outer HTML tags is removed. Newlines and spaces
|
|
|
|
|
are no longer converted to HTML entities. The whole HTML is now wrapped in
|
|
|
|
|
<pre> tag. The outer <span> has been merged with <code>.
|
2022-10-04 20:55:01 +08:00
|
|
|
|
|
2023-08-05 01:24:53 +08:00
|
|
|
|
- Calendar
|
2023-08-28 18:40:03 +08:00
|
|
|
|
. easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit
|
|
|
|
|
systems, previously it only supported years in the range from 1970 to 2037.
|
2023-08-05 01:24:53 +08:00
|
|
|
|
|
|
|
|
|
- Curl:
|
|
|
|
|
. curl_getinfo() now supports two new constants: CURLINFO_CAPATH and
|
|
|
|
|
CURLINFO_CAINFO. If option is null, the following two additional keys are
|
|
|
|
|
present: "capath" and "cainfo".
|
|
|
|
|
|
2023-02-26 05:42:10 +08:00
|
|
|
|
- Dom:
|
|
|
|
|
. Changed DOMCharacterData::appendData() tentative return type to true.
|
2023-08-28 18:40:03 +08:00
|
|
|
|
. DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(),
|
|
|
|
|
DOMDocument::loadXML() and DOMDocument::loadXMLFile() now have a tentative
|
|
|
|
|
return type of bool. Previously, this was documented as having a return
|
|
|
|
|
type of DOMDocument|bool, but DOMDocument cannot be returned since PHP 8.0
|
|
|
|
|
as it is no longer statically callable.
|
2023-02-26 05:42:10 +08:00
|
|
|
|
|
2023-06-11 22:46:29 +08:00
|
|
|
|
- Gd:
|
|
|
|
|
. Changed imagerotate signature, removed the `ignore_transparent` argument
|
|
|
|
|
as it was not used internally anyway from PHP 7.x.
|
|
|
|
|
|
2023-03-06 04:54:34 +08:00
|
|
|
|
- Intl:
|
2023-06-19 21:25:26 +08:00
|
|
|
|
. datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone)
|
2023-03-10 07:28:11 +08:00
|
|
|
|
now returns true on success, previously null was returned.
|
|
|
|
|
. IntlBreakiterator::setText() now returns false on failure, previously
|
|
|
|
|
null was returned.
|
2023-08-16 13:51:56 +08:00
|
|
|
|
now returns true on success, previously null was returned.
|
2023-03-22 04:40:53 +08:00
|
|
|
|
. IntlChar::enumCharNames is now returning a boolean.
|
|
|
|
|
Previously it returned null on success and false on failure.
|
2023-11-03 02:47:43 +08:00
|
|
|
|
. IntlDateFormatter::construct throws an U_ILLEGAL_ARGUMENT_ERROR
|
2023-11-02 03:15:12 +08:00
|
|
|
|
exception when an invalid locale had been set.
|
2023-03-06 04:54:34 +08:00
|
|
|
|
|
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
|
2023-04-11 01:35:34 +08:00
|
|
|
|
MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE.
|
2023-02-17 19:57:42 +08:00
|
|
|
|
. mb_decode_mimeheader interprets underscores in QPrint-encoded MIME
|
|
|
|
|
encoded words as required by RFC 2047; they are converted to spaces.
|
|
|
|
|
Underscores must be encoded as "=5F" in such MIME encoded words.
|
2023-03-16 10:25:38 +08:00
|
|
|
|
. In rare cases, mb_encode_mimeheader will transfer-encode its input
|
|
|
|
|
string where it would pass it through as raw ASCII in PHP 8.2.
|
2023-04-11 01:43:40 +08:00
|
|
|
|
. mb_encode_mimeheader no longer drops NUL (zero) bytes when
|
|
|
|
|
QPrint-encoding the input string. This previously caused strings in
|
|
|
|
|
certain text encodings, especially UTF-16 and UTF-32, to be
|
|
|
|
|
corrupted by mb_encode_mimeheader.
|
2023-04-11 01:43:05 +08:00
|
|
|
|
. mb_detect_encoding's "non-strict" mode now behaves as described in the
|
|
|
|
|
documentation. Previously, it would return false if the same byte
|
|
|
|
|
(for example, the first byte) of the input string was invalid in all
|
|
|
|
|
candidate encodings. More generally, it would eliminate candidate
|
|
|
|
|
encodings from consideration when an invalid byte was seen, and if the
|
|
|
|
|
same input byte eliminated all remaining encodings still under
|
|
|
|
|
consideration, it would return false. On the other hand, if all candidate
|
|
|
|
|
encodings but one were eliminated from consideration, it would return the
|
|
|
|
|
last remaining one without regard for how many encoding errors might be
|
|
|
|
|
encountered later in the string. This is different from the behavior
|
|
|
|
|
described in the documentation, which says: "If strict is set to false,
|
|
|
|
|
the closest matching encoding will be returned."
|
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
|
|
|
|
|
2023-03-12 06:29:36 +08:00
|
|
|
|
- mysqli:
|
2023-07-18 20:07:01 +08:00
|
|
|
|
. mysqli_fetch_object now raises a ValueError instead of an Exception when
|
|
|
|
|
the constructor_args argument is non empty with the class not having
|
|
|
|
|
constructor.
|
|
|
|
|
. mysqli_poll now raises a ValueError when the read nor error arguments are
|
|
|
|
|
passed.
|
2023-08-15 02:04:34 +08:00
|
|
|
|
. mysqli_field_seek and mysqli_result::field_seek now specify return type
|
|
|
|
|
as true instead of bool.
|
2023-03-15 04:34:46 +08:00
|
|
|
|
|
2023-08-08 21:31:58 +08:00
|
|
|
|
- ODBC
|
|
|
|
|
. odbc_autocommit() now accepts null for the $enable parameter.
|
|
|
|
|
Passing null has the same behaviour as passing only 1 parameter,
|
|
|
|
|
namely indicating if the autocommit feature is enabled or not.
|
|
|
|
|
|
2023-03-12 06:29:36 +08:00
|
|
|
|
- PGSQL:
|
2023-07-18 20:07:01 +08:00
|
|
|
|
. pg_fetch_object now raises a ValueError instead of an Exception when the
|
|
|
|
|
constructor_args argument is non empty with the class not having
|
|
|
|
|
constructor.
|
|
|
|
|
. pg_insert now raises a ValueError instead of a WARNING when the table
|
|
|
|
|
specified is invalid.
|
|
|
|
|
. pg_insert and pg_convert raises a ValueError or a TypeError instead of a
|
|
|
|
|
WARNING when the value/type of a field does not match properly with a
|
|
|
|
|
PostGreSQL's type.
|
|
|
|
|
. The $row param of pg_fetch_result(), pg_field_prtlen() and
|
|
|
|
|
pg_field_is_null() is now nullable.
|
2023-03-12 06:29:36 +08:00
|
|
|
|
|
2023-07-11 01:10:41 +08:00
|
|
|
|
- Random:
|
|
|
|
|
. 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
|
2023-08-28 18:40:03 +08:00
|
|
|
|
a random seed, 0 will use zero as the seed. The functions are now
|
|
|
|
|
consistent with Mt19937::__construct().
|
2023-07-11 01:10:41 +08:00
|
|
|
|
|
2023-07-18 20:07:01 +08:00
|
|
|
|
- Reflection:
|
|
|
|
|
. Return type of ReflectionClass::getStaticProperties() is no longer nullable.
|
2023-08-25 06:18:19 +08:00
|
|
|
|
. Calling ReflectionProperty::setValue() with only one parameter is deprecated.
|
|
|
|
|
To set static properties, pass null as the first parameter.
|
2023-07-18 20:07:01 +08:00
|
|
|
|
|
2022-11-16 02:36:38 +08:00
|
|
|
|
- Standard:
|
2023-05-02 01:06:40 +08:00
|
|
|
|
. E_NOTICEs emitted by unserialize() have been promoted to E_WARNING.
|
2022-11-16 02:36:38 +08:00
|
|
|
|
RFC: https://wiki.php.net/rfc/improve_unserialize_error_handling
|
2023-05-02 01:06:40 +08:00
|
|
|
|
. unserialize() now emits a new E_WARNING if the input contains unconsumed
|
|
|
|
|
bytes.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/unserialize_warn_on_trailing_data
|
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-08-28 18:40:03 +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.
|
2023-02-19 02:48:11 +08:00
|
|
|
|
. proc_open() $command array must now have at least one non empty element.
|
2023-11-13 02:17:10 +08:00
|
|
|
|
. proc_open() returns false if $command array is invalid command instead of
|
|
|
|
|
resource object that produces warning later. This was already the case for
|
|
|
|
|
Windows but it is now also the case if posix_spawn implementation is in use
|
|
|
|
|
(most Linux, BSD and MacOS platforms). There are still some old platforms
|
|
|
|
|
where this behavior is not changed as posix_spawn is not supported there.
|
2023-08-28 18:40:03 +08:00
|
|
|
|
. array_sum() and array_product() now warn when values in the array cannot
|
|
|
|
|
be converted to int/float. Previously arrays and objects where ignored
|
|
|
|
|
whilst every other value was cast to int. Moreover, objects that define
|
|
|
|
|
a numeric cast (e.g. GMP) are now casted instead of ignored.
|
2023-03-07 23:49:00 +08:00
|
|
|
|
RFC: https://wiki.php.net/rfc/saner-array-sum-product
|
2023-06-20 05:46:52 +08:00
|
|
|
|
. number_format() $decimal parameter handles rounding to negative places. It
|
|
|
|
|
means that when $decimals is negative, $num is rounded to $decimals
|
|
|
|
|
significant digits before the decimal point. Previously negative $decimals
|
|
|
|
|
got silently ignored and the number got rounded to zero decimal places.
|
2023-06-12 06:09:09 +08:00
|
|
|
|
. The $before_needle argument added to strrchr() which works in the same way
|
|
|
|
|
like its counterpart in strstr() or stristr().
|
2023-08-26 01:26:19 +08:00
|
|
|
|
. str_getcsv() and fgetcsv() return empty string instead of a string with
|
|
|
|
|
a single zero byte for the last field which contains only unterminated
|
|
|
|
|
enclosure.
|
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
|
|
|
|
|
2023-07-18 20:07:01 +08:00
|
|
|
|
- Date:
|
|
|
|
|
. Added DatePeriod::createFromISO8601String() as a replacement for the
|
|
|
|
|
overloaded constructor of DatePeriod.
|
|
|
|
|
|
2023-07-12 04:34:39 +08:00
|
|
|
|
- DOM:
|
|
|
|
|
. Added DOMNode::contains() and DOMNameSpaceNode::contains().
|
2023-07-13 04:17:10 +08:00
|
|
|
|
. Added DOMElement::getAttributeNames().
|
2023-07-13 04:40:36 +08:00
|
|
|
|
. Added DOMNode::getRootNode(). The $options argument does nothing at the
|
|
|
|
|
moment because it only influences the shadow DOM, which we do not support
|
|
|
|
|
yet.
|
2023-07-13 20:55:25 +08:00
|
|
|
|
. Added DOMParentNode::replaceChildren().
|
2023-07-13 00:07:53 +08:00
|
|
|
|
. Added DOMNode::isEqualNode().
|
2023-07-17 23:42:47 +08:00
|
|
|
|
. Added DOMElement::insertAdjacentElement() and
|
|
|
|
|
DOMElement::insertAdjacentText().
|
2023-07-13 19:16:40 +08:00
|
|
|
|
. Added DOMElement::toggleAttribute().
|
2023-07-12 04:34:39 +08:00
|
|
|
|
|
2023-07-18 20:07:01 +08:00
|
|
|
|
- Intl:
|
|
|
|
|
. Added IntlCalendar::setDate() and IntlCalendar::setDateTime()
|
|
|
|
|
as partial replacements for the overloaded IntlCalendar::set() method.
|
|
|
|
|
. Added IntlGregorianCalendar::createFromDate() and
|
|
|
|
|
IntlGregorianCalendar::createFromDateTime()
|
2023-08-28 18:40:03 +08:00
|
|
|
|
as partial replacements for the overloaded IntlGregorianCalendar
|
|
|
|
|
constructor.
|
2023-07-18 20:07:01 +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
|
|
|
|
|
2023-07-18 20:07:01 +08:00
|
|
|
|
- LDAP:
|
|
|
|
|
. Added ldap_connect_wallet().
|
|
|
|
|
. Added ldap_exop_sync().
|
|
|
|
|
|
2023-06-21 03:22:04 +08:00
|
|
|
|
- MBString:
|
|
|
|
|
. Added mb_str_pad(), which is the mbstring equivalent of str_pad().
|
|
|
|
|
RFC: https://wiki.php.net/rfc/mb_str_pad
|
|
|
|
|
|
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-08-28 18:40:03 +08:00
|
|
|
|
. Added posix_fpathconf call to get configuration value from a file
|
|
|
|
|
descriptor.
|
|
|
|
|
. Added posix_eaccess call to check the effective user id's permission for
|
|
|
|
|
a path.
|
2015-04-24 23:19:58 +08:00
|
|
|
|
|
2023-06-08 04:33:47 +08:00
|
|
|
|
- PGSQL:
|
2023-07-31 23:20:54 +08:00
|
|
|
|
. Added pg_set_error_context_visibility to set the visibility of the context
|
2023-06-21 13:37:11 +08:00
|
|
|
|
in error messages (with libpq >= 9.6).
|
2023-06-08 04:33:47 +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
|
2022-12-10 00:39:13 +08:00
|
|
|
|
|
2023-01-25 05:26:52 +08:00
|
|
|
|
- Reflection:
|
2023-07-18 20:07:01 +08:00
|
|
|
|
. Added ReflectionMethod::createFromMethodName().
|
2023-01-25 05:26:52 +08:00
|
|
|
|
|
2022-10-29 03:08:46 +08:00
|
|
|
|
- Sockets:
|
|
|
|
|
. Added socket_atmark to checks if the socket is OOB marked.
|
|
|
|
|
|
2023-07-17 22:51:24 +08:00
|
|
|
|
- Standard:
|
|
|
|
|
. Added the str_increment() and str_decrement() functions.
|
|
|
|
|
RFC: https://wiki.php.net/rfc/saner-inc-dec-operators
|
2023-07-18 20:07:01 +08:00
|
|
|
|
. Added stream_context_set_options() as a replacement for
|
|
|
|
|
stream_context_set_option() when passed an array of options.
|
2023-07-17 22:51:24 +08:00
|
|
|
|
|
2023-06-26 22:43:59 +08:00
|
|
|
|
- Zip:
|
|
|
|
|
. Added ZipArchive::setArchiveFlag and ZipArchive::getArchiveFlag methods.
|
|
|
|
|
|
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
|
|
|
|
|
2023-07-16 19:42:35 +08:00
|
|
|
|
- Core:
|
|
|
|
|
. WeakMaps now have ephemeron-like behavior: Entries whose key maps to itself
|
2023-08-28 18:40:03 +08:00
|
|
|
|
(possibly transitively) may be removed during cycle collection if the key
|
|
|
|
|
is not reachable except by iterating over the WeakMap (reachability via
|
2023-07-16 19:42:35 +08:00
|
|
|
|
iteration is considered weak). Previously, such entries would never be
|
|
|
|
|
automatically removed. (See GH-10932.)
|
2023-07-17 22:51:24 +08:00
|
|
|
|
. The ++ and -- operators now emit warnings when attempting to increment
|
|
|
|
|
values of type bool as this will change in the next major version.
|
|
|
|
|
A warning is emitted when trying to decrement values of type null, as
|
|
|
|
|
this will change in the next major version.
|
|
|
|
|
Internal objects that implement an _IS_NUMBER cast but not a do_operator
|
2023-08-16 13:51:56 +08:00
|
|
|
|
handler that overrides addition and subtraction now can be incremented
|
2023-07-17 22:51:24 +08:00
|
|
|
|
and decrement as if one would do $o += 1 or $o -= 1
|
2023-07-16 19:42:35 +08:00
|
|
|
|
|
2023-07-04 03:33:21 +08:00
|
|
|
|
- DOM:
|
|
|
|
|
. The DOM lifetime mechanism has been reworked such that implicitly removed
|
|
|
|
|
nodes can still be fetched. Previously this resulted in an exception.
|
|
|
|
|
|
2023-07-03 21:30:52 +08:00
|
|
|
|
- SQLite3
|
|
|
|
|
. The SQLite3 class now throws \SQLite3Exception (extends \Exception) instead
|
|
|
|
|
of \Exception.
|
2023-08-28 18:40:03 +08:00
|
|
|
|
. The SQLite error code is now passed in the exception error code instead of
|
|
|
|
|
being included in the error message.
|
2023-07-03 21:30:52 +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
|
|
|
|
|
2023-07-18 02:42:39 +08:00
|
|
|
|
- Curl:
|
|
|
|
|
. CURLINFO_CAPATH
|
|
|
|
|
. CURLINFO_CAINFO
|
|
|
|
|
. CURLOPT_MIME_OPTIONS
|
|
|
|
|
. CURLMIMEOPT_FORMESCAPE
|
|
|
|
|
. CURLOPT_WS_OPTIONS
|
|
|
|
|
. CURLWS_RAW_MODE
|
|
|
|
|
. CURLOPT_SSH_HOSTKEYFUNCTION
|
|
|
|
|
. CURLOPT_PROTOCOLS_STR
|
|
|
|
|
. CURLOPT_REDIR_PROTOCOLS_STR
|
|
|
|
|
. CURLOPT_CA_CACHE_TIMEOUT
|
|
|
|
|
. CURLOPT_QUICK_EXIT
|
|
|
|
|
. CURLKHMATCH_OK
|
|
|
|
|
. CURLKHMATCH_MISMATCH
|
|
|
|
|
. CURLKHMATCH_MISSING
|
|
|
|
|
. CURLKHMATCH_LAST
|
|
|
|
|
|
2023-02-28 20:08:01 +08:00
|
|
|
|
- Intl:
|
|
|
|
|
. MIXED_NUMBERS (Spoofchecker).
|
|
|
|
|
. HIDDEN_OVERLAY (Spoofchecker).
|
|
|
|
|
|
2023-02-25 17:22:09 +08:00
|
|
|
|
- OpenSSL:
|
|
|
|
|
. OPENSSL_CMS_OLDMIMETYPE
|
|
|
|
|
. PKCS7_NOOLDMIMETYPE
|
|
|
|
|
|
2022-11-12 03:15:58 +08:00
|
|
|
|
- PCNTL:
|
|
|
|
|
. SIGINFO
|
|
|
|
|
|
2023-08-22 17:01:28 +08:00
|
|
|
|
- PDO_ODBC
|
|
|
|
|
. PDO_ODBC_TYPE
|
|
|
|
|
|
2023-04-09 18:59:50 +08:00
|
|
|
|
- PGSQL:
|
2023-07-31 23:37:58 +08:00
|
|
|
|
. PGSQL_TRACE_SUPPRESS_TIMESTAMPS
|
|
|
|
|
. PGSQL_TRACE_REGRESS_MODE
|
|
|
|
|
. PGSQL_ERRORS_SQLSTATE
|
|
|
|
|
. PGSQL_SHOW_CONTEXT_NEVER
|
|
|
|
|
. PGSQL_SHOW_CONTEXT_ERRORS
|
|
|
|
|
. PGSQL_SHOW_CONTEXT_ALWAYS
|
2023-04-09 18:59:50 +08:00
|
|
|
|
|
2022-09-05 02:52:21 +08:00
|
|
|
|
- Posix:
|
2023-07-31 22:56:24 +08:00
|
|
|
|
. POSIX_SC_ARG_MAX
|
|
|
|
|
. POSIX_SC_PAGESIZE
|
|
|
|
|
. POSIX_SC_NPROCESSORS_CONF
|
|
|
|
|
. POSIX_SC_NPROCESSORS_ONLN
|
|
|
|
|
. POSIX_PC_LINK_MAX
|
|
|
|
|
. POSIX_PC_MAX_CANON
|
|
|
|
|
. POSIX_PC_MAX_INPUT
|
|
|
|
|
. POSIX_PC_NAME_MAX
|
|
|
|
|
. POSIX_PC_PATH_MAX
|
|
|
|
|
. POSIX_PC_PIPE_BUF
|
|
|
|
|
. POSIX_PC_CHOWN_RESTRICTED
|
|
|
|
|
. POSIX_PC_NO_TRUNC
|
|
|
|
|
. POSIX_PC_ALLOC_SIZE_MIN
|
|
|
|
|
. POSIX_PC_SYMLINK_MAX
|
2022-09-05 02:52:21 +08:00
|
|
|
|
|
2022-02-09 02:28:24 +08:00
|
|
|
|
- Sockets:
|
|
|
|
|
. SO_ATTACH_REUSEPORT_CBPF (Linux only).
|
2023-08-24 20:52:56 +08:00
|
|
|
|
. SO_DETACH_BPF (Linux only).
|
|
|
|
|
. SO_DETACH_FILTER (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).
|
2023-01-29 03:44:37 +08:00
|
|
|
|
. SOL_UDPLITE.
|
|
|
|
|
. UDPLITE_RECV_CSCOV.
|
|
|
|
|
. UDPLITE_SEND_CSCOV.
|
2023-02-11 15:50:36 +08:00
|
|
|
|
. SO_RERROR (NetBSD only).
|
|
|
|
|
. SO_ZEROIZE (OpenBSD only).
|
|
|
|
|
. SO_SPLICE (OpenBSD only).
|
2023-02-28 05:38:41 +08:00
|
|
|
|
. TCP_REPAIR (Linux only).
|
2023-04-08 15:50:40 +08:00
|
|
|
|
. SO_REUSEPORT_LB (FreeBSD only).
|
2023-04-23 00:44:42 +08:00
|
|
|
|
. IP_BIND_ADDRESS_NO_PORT (Linux only).
|
2022-02-09 02:28:24 +08:00
|
|
|
|
|
2023-06-26 22:43:59 +08:00
|
|
|
|
- Zip:
|
|
|
|
|
. ZipArchive::ER_DATA_LENGTH (libzip >= 1.10)
|
|
|
|
|
. ZipArchive::ER_NOT_ALLOWED (libzip >= 1.10)
|
|
|
|
|
. ZipArchive::AFL_RDONLY (libzip >= 1.10)
|
|
|
|
|
. ZipArchive::AFL_IS_TORRENTZIP (libzip >= 1.10)
|
|
|
|
|
. ZipArchive::AFL_WANT_TORRENTZIP (libzip >= 1.10)
|
|
|
|
|
. ZipArchive::AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE (libzip >= 1.10)
|
2023-06-29 21:21:15 +08:00
|
|
|
|
. ZipArchive::FL_OPEN_FILE_NOW
|
2023-07-28 17:39:51 +08:00
|
|
|
|
. ZipArchive::LENGTH_TO_END as default value for addFile and replaceFile
|
|
|
|
|
. ZipArchive::LENGTH_UNCHECKED (libzip >= 1.10.1)
|
2023-06-26 22:43:59 +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
|
|
|
|
|
2023-07-13 22:45:32 +08:00
|
|
|
|
- assert.*
|
|
|
|
|
. The assert.* INI settings have been deprecated.
|
|
|
|
|
This comprises the following INI settings:
|
|
|
|
|
- assert.active
|
|
|
|
|
- assert.bail
|
|
|
|
|
- assert.callback
|
|
|
|
|
- assert.exception
|
|
|
|
|
- assert.warning
|
|
|
|
|
If the value of the setting is equal to the default value, no deprecation
|
|
|
|
|
notice is emitted.
|
|
|
|
|
The zend.assertions INI setting should be used instead.
|
|
|
|
|
|
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
|
|
|
|
|
========================================
|
|
|
|
|
|
2023-07-09 04:52:56 +08:00
|
|
|
|
- Minimum supported Windows version has been bumped to Windows 8 or
|
|
|
|
|
Windows Server 2012
|
|
|
|
|
|
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
|
2023-08-28 18:40:03 +08:00
|
|
|
|
by the INI directives zend.max_allowed_stack_size,
|
|
|
|
|
zend.reserved_stack_size and fiber.stack_size.
|
2022-12-17 01:14:22 +08:00
|
|
|
|
|
2022-10-14 18:25:17 +08:00
|
|
|
|
- FFI:
|
2023-08-28 18:40:03 +08:00
|
|
|
|
. 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.
|
2022-10-14 18:25:17 +08:00
|
|
|
|
|
2023-04-13 05:17:03 +08:00
|
|
|
|
- FPM:
|
|
|
|
|
. FPM CLI test now fails if the socket path is longer than supported by OS.
|
|
|
|
|
|
2022-10-14 18:25:17 +08:00
|
|
|
|
- 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.
|
2023-08-27 22:41:09 +08:00
|
|
|
|
. Memory stream no longer fails if seek offset is past the end. Instead
|
|
|
|
|
the memory is increase on the next write and date between the old end and
|
|
|
|
|
offset is filled with zero bytes in the same way how it works for files.
|
2023-08-29 05:00:05 +08:00
|
|
|
|
. stat() access operations like file_exists() and similar will now use real
|
|
|
|
|
path instead of the actual stream path. This is consistent with stream
|
2023-08-28 18:03:34 +08:00
|
|
|
|
opening.
|
2022-10-05 21:31:28 +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
|
|
|
|
========================================
|
2023-06-20 00:46:05 +08:00
|
|
|
|
|
2023-06-28 00:03:52 +08:00
|
|
|
|
- DOM:
|
|
|
|
|
. Looping over a DOMNodeList now uses caching. Therefore requesting items no
|
|
|
|
|
longer takes quadratic time by default.
|
|
|
|
|
. Getting text content from nodes now avoids an allocation, resulting in a
|
|
|
|
|
performance gain.
|
2023-08-06 04:08:16 +08:00
|
|
|
|
. DOMChildNode::remove() now runs in O(1) performance.
|
2023-07-08 00:05:59 +08:00
|
|
|
|
|
|
|
|
|
- Standard:
|
|
|
|
|
. The file() flags error check is now about 7% faster.
|
|
|
|
|
|
|
|
|
|
- SPL:
|
|
|
|
|
. RecursiveDirectoryIterator now performs less I/O when looping over a
|
|
|
|
|
directory.
|