mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
grapheme_substr() no longer returns false in some cases
Cf. <https://github.com/php/doc-en/issues/1653>.
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
length of string). If <parameter>length</parameter> is given and is negative, then
|
||||
that many grapheme units will be omitted from the end of string (after the
|
||||
start position has been calculated when <parameter>offset</parameter> is negative). If <parameter>offset</parameter>
|
||||
denotes a position beyond this truncation, &false; will be returned.
|
||||
denotes a position beyond this truncation, an empty string will be returned.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -69,6 +69,29 @@
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
The function now consistently clamps out-of-bounds offsets to the string boundary.
|
||||
Previously, &false; was returned instead of the empty string in some cases.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
|
||||
Reference in New Issue
Block a user