Skip to content

Commit 39247cb

Browse files
mumumucmb69
andauthored
[PHP 8.1] Document deprecated ctype non-string argument. (#1179)
Co-authored-by: Christoph M. Becker <[email protected]>
1 parent 8a7836b commit 39247cb

File tree

13 files changed

+18
-1
lines changed

13 files changed

+18
-1
lines changed

appendices/migration81/deprecated.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ $arr[] = 2;
153153
In the future, the argument will be interpreted as a string instead
154154
of an ASCII codepoint.
155155
Depending on the intended behavior, the argument should either be
156-
casted to &string; or an explicit call to
156+
cast to &string; or an explicit call to
157157
<function>chr</function> should be made.
158158
All <literal>ctype_*()</literal> functions are affected.
159159
</para>

language-snippets.ent

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,6 +1846,12 @@ the ASCII value of a single character (negative values have 256 added in order t
18461846
characters in the Extended ASCII range). Any other integer is interpreted as a string
18471847
containing the decimal digits of the integer.</para></note>'>
18481848

1849+
<!ENTITY note.ctype.parameter.non-string '<warning xmlns="http://docbook.org/ns/docbook"><para>
1850+
As of PHP 8.1.0, passing a non-string argument is deprecated.
1851+
In the future, the argument will be interpreted as a string instead of an ASCII codepoint.
1852+
Depending on the intended behavior, the argument should either be cast to &string;
1853+
or an explicit call to <function>chr</function> should be made.</para></warning>'>
1854+
18491855
<!-- FTP Notes -->
18501856
<!ENTITY ftp.changelog.ftp-param '<row xmlns="http://docbook.org/ns/docbook">
18511857
<entry>8.1.0</entry>

reference/ctype/functions/ctype-alnum.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<para>
3030
The tested string.
3131
&note.ctype.parameter.integer;
32+
&note.ctype.parameter.non-string;
3233
</para>
3334
</listitem>
3435
</varlistentry>

reference/ctype/functions/ctype-alpha.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<para>
3535
The tested string.
3636
&note.ctype.parameter.integer;
37+
&note.ctype.parameter.non-string;
3738
</para>
3839
</listitem>
3940
</varlistentry>

reference/ctype/functions/ctype-cntrl.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<para>
3131
The tested string.
3232
&note.ctype.parameter.integer;
33+
&note.ctype.parameter.non-string;
3334
</para>
3435
</listitem>
3536
</varlistentry>

reference/ctype/functions/ctype-digit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<para>
3030
The tested string.
3131
&note.ctype.parameter.integer;
32+
&note.ctype.parameter.non-string;
3233
</para>
3334
</listitem>
3435
</varlistentry>

reference/ctype/functions/ctype-graph.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<para>
3030
The tested string.
3131
&note.ctype.parameter.integer;
32+
&note.ctype.parameter.non-string;
3233
</para>
3334
</listitem>
3435
</varlistentry>

reference/ctype/functions/ctype-lower.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<para>
3030
The tested string.
3131
&note.ctype.parameter.integer;
32+
&note.ctype.parameter.non-string;
3233
</para>
3334
</listitem>
3435
</varlistentry>

reference/ctype/functions/ctype-print.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<para>
3030
The tested string.
3131
&note.ctype.parameter.integer;
32+
&note.ctype.parameter.non-string;
3233
</para>
3334
</listitem>
3435
</varlistentry>

reference/ctype/functions/ctype-punct.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<para>
3333
The tested string.
3434
&note.ctype.parameter.integer;
35+
&note.ctype.parameter.non-string;
3536
</para>
3637
</listitem>
3738
</varlistentry>

0 commit comments

Comments
 (0)