@@ -26,52 +26,52 @@ PHP 8.3 UPGRADE NOTES
26
26
(`fiber.stack_size-zend.reserved_stack_size` for fibers).
27
27
. Executing proc_get_status() multiple times will now always return the right
28
28
value on posix systems. Previously, only the first call of the function
29
- returned the right value. Executing proc_close() after proc_get_status() will
30
- now also return the right exit code. Previously this would return -1.
29
+ returned the right value. Executing proc_close() after proc_get_status()
30
+ will now also return the right exit code. Previously this would return -1.
31
31
Internally, this works by caching the result on posix systems. If you want
32
32
the old behaviour, you can check the "cached" key in the array returned by
33
33
proc_get_status() to check whether the result was cached.
34
34
. Zend Max Execution Timers is now enabled by default for ZTS builds on
35
35
Linux.
36
36
. Uses of traits with static properties will now redeclare static properties
37
- inherited from the parent class. This will create a separate static property
38
- storage for the current class. This is analogous to adding the static
39
- property to the class directly without traits.
37
+ inherited from the parent class. This will create a separate static
38
+ property storage for the current class. This is analogous to adding the
39
+ static property to the class directly without traits.
40
40
. Assigning a negative index n to an empty array will now make sure that the
41
41
next index is n+1 instead of 0.
42
42
. Class constant visibility variance is now correctly checked when inherited
43
43
from interfaces.
44
- . WeakMaps entries whose key maps to itself (possibly transitively) may now be
45
- removed during cycle collection if the key is not reachable except by
44
+ . WeakMaps entries whose key maps to itself (possibly transitively) may now
45
+ be removed during cycle collection if the key is not reachable except by
46
46
iterating over the WeakMap (reachability via iteration is considered weak).
47
47
Previously, such entries would never be automatically removed.
48
48
49
49
- DOM:
50
50
. DOMChildNode::after(), DOMChildNode::before(), DOMChildNode::replaceWith()
51
- on a node that has no parent is now a no-op instead of a hierarchy exception,
52
- which is the behaviour spec demands.
53
- . Using the DOMParentNode and DOMChildNode methods without a document now works
54
- instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in line with
55
- the behaviour spec demands.
56
- . createAttributeNS() without specifying a prefix would incorrectly create a default
57
- namespace, placing the element inside the namespace instead of the attribute.
58
- This bug is now fixed.
59
- . createAttributeNS() would previously incorrectly throw a NAMESPACE_ERR when the
60
- prefix was already used for a different uri. It now correctly chooses a
61
- different prefix when there's a prefix name conflict.
51
+ on a node that has no parent is now a no-op instead of a hierarchy
52
+ exception, which is the behaviour spec demands.
53
+ . Using the DOMParentNode and DOMChildNode methods without a document now
54
+ works instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in
55
+ line with the behaviour spec demands.
56
+ . createAttributeNS() without specifying a prefix would incorrectly create
57
+ a default namespace, placing the element inside the namespace instead of
58
+ the attribute. This bug is now fixed.
59
+ . createAttributeNS() would previously incorrectly throw a NAMESPACE_ERR
60
+ when the prefix was already used for a different uri. It now correctly
61
+ chooses a different prefix when there's a prefix name conflict.
62
62
63
63
- FFI:
64
64
. C functions that have a return type of void now return null instead of
65
65
returning the following object object(FFI\CData:void) { }
66
66
67
67
- Opcache:
68
68
. The opcache.consistency_checks INI directive was removed. This feature was
69
- broken with the tracing JIT, as well as with inheritance cache, and has been
70
- disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5. Both the
71
- tracing JIT and inheritance cache may modify shm after the script has been
72
- persisted, invalidating its checksum. The attempted fix skipped over the
73
- modifiable pointers but was rejected due to complexity. For this reason, it
74
- was decided to remove the feature instead.
69
+ broken with the tracing JIT, as well as with inheritance cache, and has
70
+ been disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5.
71
+ Both the tracing JIT and inheritance cache may modify shm after the script
72
+ has been persisted by invalidating its checksum. The attempted fix skipped
73
+ over the modifiable pointers but was rejected due to complexity. For this
74
+ reason, it was decided to remove the feature instead.
75
75
76
76
- Phar:
77
77
. The type of Phar class constants are now declared.
@@ -117,7 +117,8 @@ PHP 8.3 UPGRADE NOTES
117
117
. Added the #[\Override] attribute to check that a method exists
118
118
in a parent class or implemented interface.
119
119
RFC: https://wiki.php.net/rfc/marking_overriden_methods
120
- . Class constants can now be accessed dynamically using the C::{$name} syntax.
120
+ . Class constants can now be accessed dynamically using the C::{$name}
121
+ syntax.
121
122
RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch
122
123
. Static variable initializers can now contain arbitrary expressions.
123
124
RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers
@@ -133,20 +134,21 @@ PHP 8.3 UPGRADE NOTES
133
134
- Posix
134
135
. posix_getrlimit() now takes an optional $res parameter to allow fetching a
135
136
single resource limit.
136
- . posix_isatty() now raises type warnings for integers following the usual ZPP semantics
137
- . posix_ttyname() now raises type warnings for integers following the usual ZPP semantics
138
- and value warnings for invalid file descriptor integers.
137
+ . posix_isatty() now raises type warnings for integers following the usual
138
+ ZPP semantics.
139
+ . posix_ttyname() now raises type warnings for integers following the usual
140
+ ZPP semantics and value warnings for invalid file descriptor integers.
139
141
140
142
- Streams
141
- . Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was previously
142
- not implemented.
143
+ . Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was
144
+ previously not implemented.
143
145
144
146
========================================
145
147
3. Changes in SAPI modules
146
148
========================================
147
149
148
- - $_SERVER['SERVER_SOFTWARE'] value from the built-in CLI server changed
149
- to make it compliant with RFC3875.
150
+ - $_SERVER['SERVER_SOFTWARE'] value from the built-in CLI server changed to
151
+ make it compliant with RFC3875.
150
152
151
153
========================================
152
154
4. Deprecated Functionality
@@ -198,8 +200,8 @@ PHP 8.3 UPGRADE NOTES
198
200
199
201
- SQLite3
200
202
. Using exceptions is now preferred, warnings will be removed in the future.
201
- Calling SQLite3::enableExceptions(false) will trigger a depreciation warning
202
- in this version.
203
+ Calling SQLite3::enableExceptions(false) will trigger a depreciation
204
+ warning in this version.
203
205
204
206
- Zip:
205
207
. The ZipArchive::FL_RECOMPRESS constant is deprecated and will be removed
@@ -236,8 +238,8 @@ PHP 8.3 UPGRADE NOTES
236
238
<pre> tag. The outer <span> has been merged with <code>.
237
239
238
240
- Calendar
239
- . easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit systems,
240
- previously it only supported years in the range from 1970 to 2037.
241
+ . easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit
242
+ systems, previously it only supported years in the range from 1970 to 2037.
241
243
242
244
- Curl:
243
245
. curl_getinfo() now supports two new constants: CURLINFO_CAPATH and
@@ -246,11 +248,11 @@ PHP 8.3 UPGRADE NOTES
246
248
247
249
- Dom:
248
250
. Changed DOMCharacterData::appendData() tentative return type to true.
249
- . DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(), DOMDocument::loadXML(),
250
- and DOMDocument::loadXMLFile() now have a tentative return type of bool.
251
- Previously, this was documented as having a return type of DOMDocument|bool,
252
- but DOMDocument cannot be returned since PHP 8.0 as it is no longer statically
253
- callable.
251
+ . DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(),
252
+ DOMDocument::loadXML() and DOMDocument::loadXMLFile() now have a tentative
253
+ return type of bool. Previously, this was documented as having a return
254
+ type of DOMDocument|bool, but DOMDocument cannot be returned since PHP 8.0
255
+ as it is no longer statically callable.
254
256
255
257
- Gd:
256
258
. Changed imagerotate signature, removed the `ignore_transparent` argument
@@ -321,8 +323,8 @@ PHP 8.3 UPGRADE NOTES
321
323
- Random:
322
324
. Changed mt_srand() and srand() to not check the number of arguments to
323
325
determine whether a random seed should be used. Passing null will generate
324
- a random seed, 0 will use zero as the seed. The functions are now consistent
325
- with Mt19937::__construct().
326
+ a random seed, 0 will use zero as the seed. The functions are now
327
+ consistent with Mt19937::__construct().
326
328
327
329
- Reflection:
328
330
. Return type of ReflectionClass::getStaticProperties() is no longer nullable.
@@ -338,13 +340,15 @@ PHP 8.3 UPGRADE NOTES
338
340
. array_pad() is now only limited by the maximum number of elements an array
339
341
can have. Before, it was only possible to add at most 1048576 elements at a
340
342
time.
341
- . strtok() raises a warning in the case token is not provided when starting tokenization.
343
+ . strtok() raises a warning in the case token is not provided when starting
344
+ tokenization.
342
345
. password_hash() will now chain the underlying Random\RandomException
343
346
as the ValueError’s $previous Exception when salt generation fails.
344
347
. proc_open() $command array must now have at least one non empty element.
345
- . array_sum() and array_product() now warn when values in the array cannot be converted to int/float.
346
- Previously arrays and objects where ignored whilst every other value was cast to int.
347
- Moreover, objects that define a numeric cast (e.g. GMP) are now casted instead of ignored.
348
+ . array_sum() and array_product() now warn when values in the array cannot
349
+ be converted to int/float. Previously arrays and objects where ignored
350
+ whilst every other value was cast to int. Moreover, objects that define
351
+ a numeric cast (e.g. GMP) are now casted instead of ignored.
348
352
RFC: https://wiki.php.net/rfc/saner-array-sum-product
349
353
. number_format() $decimal parameter handles rounding to negative places. It
350
354
means that when $decimals is negative, $num is rounded to $decimals
@@ -386,7 +390,8 @@ PHP 8.3 UPGRADE NOTES
386
390
as partial replacements for the overloaded IntlCalendar::set() method.
387
391
. Added IntlGregorianCalendar::createFromDate() and
388
392
IntlGregorianCalendar::createFromDateTime()
389
- as partial replacements for the overloaded IntlGregorianCalendar constructor.
393
+ as partial replacements for the overloaded IntlGregorianCalendar
394
+ constructor.
390
395
391
396
- JSON:
392
397
. Added json_validate(), which returns whether the json is valid for
@@ -404,8 +409,10 @@ PHP 8.3 UPGRADE NOTES
404
409
- Posix:
405
410
. Added posix_sysconf call to get runtime informations.
406
411
. Added posix_pathconf call to get configuration value from a directory/file.
407
- . Added posix_fpathconf call to get configuration value from a file descriptor.
408
- . Added posix_eaccess call to check the effective user id's permission for a path.
412
+ . Added posix_fpathconf call to get configuration value from a file
413
+ descriptor.
414
+ . Added posix_eaccess call to check the effective user id's permission for
415
+ a path.
409
416
410
417
- PGSQL:
411
418
. Added pg_set_error_context_visibility to set the visibility of the context
@@ -450,8 +457,8 @@ PHP 8.3 UPGRADE NOTES
450
457
451
458
- Core:
452
459
. WeakMaps now have ephemeron-like behavior: Entries whose key maps to itself
453
- (possibly transitively) may be removed during cycle collection if the key is
454
- not reachable except by iterating over the WeakMap (reachability via
460
+ (possibly transitively) may be removed during cycle collection if the key
461
+ is not reachable except by iterating over the WeakMap (reachability via
455
462
iteration is considered weak). Previously, such entries would never be
456
463
automatically removed. (See GH-10932.)
457
464
. The ++ and -- operators now emit warnings when attempting to increment
@@ -469,8 +476,8 @@ PHP 8.3 UPGRADE NOTES
469
476
- SQLite3
470
477
. The SQLite3 class now throws \SQLite3Exception (extends \Exception) instead
471
478
of \Exception.
472
- . The SQLite error code is now passed in the exception error code instead of being
473
- included in the error message.
479
+ . The SQLite error code is now passed in the exception error code instead of
480
+ being included in the error message.
474
481
475
482
========================================
476
483
10. New Global Constants
@@ -621,13 +628,13 @@ PHP 8.3 UPGRADE NOTES
621
628
. An Error is now thrown when the process call stack exceeds a certain size,
622
629
to prevent stack-overflow-induced segmentation faults, with the goal of
623
630
making debugging easier. The maximum allowed stack size is controlled
624
- by the INI directives zend.max_allowed_stack_size, zend.reserved_stack_size,
625
- and fiber.stack_size.
631
+ by the INI directives zend.max_allowed_stack_size,
632
+ zend.reserved_stack_size and fiber.stack_size.
626
633
627
634
- FFI:
628
- . FFI::load() is now allowed during preloading when opcache.preload_user is the
629
- current system user. Previously, calling FFI::load() was not possible during
630
- preloading if the opcache.preload_user directive was set.
635
+ . FFI::load() is now allowed during preloading when opcache.preload_user is
636
+ the current system user. Previously, calling FFI::load() was not possible
637
+ during preloading if the opcache.preload_user directive was set.
631
638
632
639
- FPM:
633
640
. FPM CLI test now fails if the socket path is longer than supported by OS.
0 commit comments