Skip to content

Commit 12d84fe

Browse files
committed
UPGRADING
1 parent afd1695 commit 12d84fe

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

UPGRADING

+19
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ PHP 8.3 UPGRADE NOTES
118118
4. Deprecated Functionality
119119
========================================
120120

121+
- Core
122+
. Using the ++ operator on empty, non-numeric, or non-alphanumeric strings
123+
is now deprecated. Moreover, incrementing non-numeric strings is soft
124+
deprecated and the new str_increment() function should be used instead.
125+
RFC: https://wiki.php.net/rfc/saner-inc-dec-operators
126+
. Using the -- operator on empty or non-numeric strings is now deprecated.
127+
RFC: https://wiki.php.net/rfc/saner-inc-dec-operators
128+
121129
- Intl
122130
. The U_MULTIPLE_DECIMAL_SEP*E*RATORS constant had been deprecated, using
123131
the U_MULTIPLE_DECIMAL_SEP*A*RATORS instead is recommended.
@@ -300,6 +308,10 @@ PHP 8.3 UPGRADE NOTES
300308
- Sockets:
301309
. Added socket_atmark to checks if the socket is OOB marked.
302310

311+
- Standard:
312+
. Added the str_increment() and str_decrement() functions.
313+
RFC: https://wiki.php.net/rfc/saner-inc-dec-operators
314+
303315
- Zip:
304316
. Added ZipArchive::setArchiveFlag and ZipArchive::getArchiveFlag methods.
305317

@@ -321,6 +333,13 @@ PHP 8.3 UPGRADE NOTES
321333
not reachable except by iterating over the WeakMap (reachability via
322334
iteration is considered weak). Previously, such entries would never be
323335
automatically removed. (See GH-10932.)
336+
. The ++ and -- operators now emit warnings when attempting to increment
337+
values of type bool as this will change in the next major version.
338+
A warning is emitted when trying to decrement values of type null, as
339+
this will change in the next major version.
340+
Internal objects that implement an _IS_NUMBER cast but not a do_operator
341+
handler that overrides addition and substraction now can be incremented
342+
and decrement as if one would do $o += 1 or $o -= 1
324343

325344
- DOM:
326345
. The DOM lifetime mechanism has been reworked such that implicitly removed

0 commit comments

Comments
 (0)