Skip to content

Commit b9c7382

Browse files
committed
UPGRADING doc
1 parent 69512d2 commit b9c7382

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

UPGRADING

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,27 @@ PHP 8.3 UPGRADE NOTES
5252
. C functions that have a return type of void now return null instead of
5353
returning the following object object(FFI\CData:void) { }
5454

55+
- Standard:
56+
. The range() function has had various changes:
57+
* A TypeError is now thrown when passing objects, resources, or arrays
58+
as the boundary inputs
59+
* A more descriptive ValueError is thrown when passing 0 for $step
60+
* A ValueError is now thrown when using a negative $step for increasing ranges
61+
* If $step is a float that can be interpreted as an int, it is now done so
62+
* A ValueError is now thrown if any argument is infinity or NAN
63+
* An E_WARNING is now emitted if $start or $end is the empty string.
64+
The value continues to be cast to the value 0.
65+
* An E_WARNING is now emitted if $start or $end has more than one byte,
66+
only if it is a non-numeric string.
67+
* An E_WARNING is now emitted if $start or $end is cast to an integer
68+
because the other boundary input is a number. (e.g. range(5, 'z');)
69+
* An E_WARNING is now emitted if $step is a float when trying to generate
70+
a range of characters, except if both boundary inputs are numeric strings
71+
(e.g. range('5', '9', 0.5); does not produce a warning)
72+
* range() now produce a list of characters if one of the boundary inputs is
73+
a string digit instead of casting the other input to int
74+
(e.g. range('5', 'z');)
75+
5576
========================================
5677
2. New Features
5778
========================================
@@ -113,7 +134,7 @@ PHP 8.3 UPGRADE NOTES
113134
. Changed DOMCharacterData::appendData() tentative return type to true.
114135

115136
- Intl:
116-
. datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone)
137+
. datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone)
117138
now returns true on success, previously null was returned.
118139
. IntlBreakiterator::setText() now returns false on failure, previously
119140
null was returned.

0 commit comments

Comments
 (0)