[doc-en] master: charfromname.xml: complete the definition and add an example ext name (#3592)
| From: | Mikhail Alferov via GitHub | Date: | Wed, 19 Aug 2026 09:37:44 +0000 |
| Subject: | [doc-en] master: charfromname.xml: complete the definition and add an example ext name (#3592) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23587@lists.php.net to get a copy of this message | ||
Author: Mikhail Alferov (mmalferov)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-08-19T11:37:42+02:00
Commit: https://github.com/php/doc-en/commit/e46ec4dad4bfe9641de25313eee38159bc921f22
Raw diff: https://github.com/php/doc-en/commit/e46ec4dad4bfe9641de25313eee38159bc921f22.diff
charfromname.xml: complete the definition and add an example ext name (#3592)
* charfromname.xml: clarify the meaning and add an example ext name
* Add the missing example output and use simpara for the touched paragraph
---------
Co-authored-by: lacatoire <la.catoire@gmail.com>
Changed paths:
M reference/intl/intlchar/charfromname.xml
Diff:
diff --git a/reference/intl/intlchar/charfromname.xml b/reference/intl/intlchar/charfromname.xml
index 71d1b85475ad..c29fd6890b15 100644
--- a/reference/intl/intlchar/charfromname.xml
+++ b/reference/intl/intlchar/charfromname.xml
@@ -19,10 +19,12 @@
<para>
The name is matched exactly and completely. If the name does not correspond to a code point,
&null; is returned.
</para>
- <para>
- A Unicode 1.0 name is matched only if it differs from the modern name. Unicode names are all
uppercase.
- Extended names are lowercase followed by an uppercase hexadecimal number, and within angle
brackets.
- </para>
+ <simpara>
+ A Unicode 1.0 name is matched only if it differs from the modern name.
+ Unicode names are all uppercase. Extended names are lowercase followed by a
+ hyphen followed by an uppercase hexadecimal number, and within angle
+ brackets.
+ </simpara>
</refsect1>
<refsect1 role="parameters">
@@ -68,10 +70,14 @@
<programlisting role="php">
<![CDATA[
<?php
+
var_dump(IntlChar::charFromName("LATIN CAPITAL LETTER A"));
var_dump(IntlChar::charFromName("SNOWMAN"));
var_dump(IntlChar::charFromName("RECYCLING SYMBOL FOR TYPE-1 PLASTICS"));
var_dump(IntlChar::charFromName("A RANDOM STRING WHICH DOESN'T CORRESPOND TO ANY UNICODE
CHARACTER"));
+
+var_dump(IntlChar::charFromName("<control-08>", IntlChar::EXTENDED_CHAR_NAME));
+
?>
]]>
</programlisting>
@@ -82,6 +88,7 @@ int(65)
int(9731)
int(9843)
NULL
+int(8)
]]>
</screen>
</example>