[DOC-CVS] [doc-en] master: Deprecated non-canonical cast names (#5016)
[email protected] (Leo BONAZ via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Leo BONAZ (bilboque)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-01-09T01:56:03Z
Commit: https://github.com/php/doc-en/commit/78a11d3ca004ee937549d932e77a79c51b9777cd
Raw diff: https://github.com/php/doc-en/commit/78a11d3ca004ee937549d932e77a79c51b9777cd.diff
Deprecated non-canonical cast names (#5016)
Changed paths:
M language/types/integer.xml
M language/types/type-juggling.xml
Diff:
diff --git a/language/types/integer.xml b/language/types/integer.xml
index ed45d8511608..426abf6545c8 100644
--- a/language/types/integer.xml
+++ b/language/types/integer.xml
@@ -151,9 +151,8 @@ var_dump(round(25/7)); // float(4)
<title>Converting to integer</title>
<simpara>
- To explicitly convert a value to <type>int</type>, use either the
- <literal>(int)</literal> or <literal>(integer)</literal> casts. However, in
- most cases the cast is not needed, since a value will be automatically
+ To explicitly convert a value to <type>int</type>, use the <literal>(int)</literal> cast.
+ However, in most cases the cast is not needed, since a value will be automatically
converted if an operator, function or control structure requires an
<type>int</type> argument. A value can also be converted to
<type>int</type> with the <function>intval</function> function.
diff --git a/language/types/type-juggling.xml b/language/types/type-juggling.xml
index 6e7cd80104f3..d3f177f9b1cc 100644
--- a/language/types/type-juggling.xml
+++ b/language/types/type-juggling.xml
@@ -317,16 +317,16 @@ var_dump($bar);
<member><literal>(unset)</literal> - cast to <type>NULL</type></member>
</simplelist>
- <note>
+ <warning>
<para>
<literal>(integer)</literal> is an alias of the <literal>(int)</literal> cast.
<literal>(boolean)</literal> is an alias of the <literal>(bool)</literal> cast.
<literal>(binary)</literal> is an alias of the <literal>(string)</literal> cast.
<literal>(double)</literal> and <literal>(real)</literal> are aliases of
the <literal>(float)</literal> cast.
- These casts do not use the canonical type name and are not recommended.
+ These casts do not use the canonical type name and are deprecated as of PHP 8.5.0.
</para>
- </note>
+ </warning>
<warning>
<simpara>