Skip to content

Commit e908bfd

Browse files
Update idn-to-ascii.xml: Adding info about conversion to lowercase (#4505)
This would close https://bugs.php.net/bug.php?id=80922
1 parent 21ce7d7 commit e908bfd

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

reference/intl/idn/idn-to-ascii.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<methodparam choice="opt"><type>array</type><parameter role="reference">idna_info</parameter><initializer>&null;</initializer></methodparam>
1717
</methodsynopsis>
1818
<para>
19-
This function converts a Unicode domain name to an IDNA ASCII-compatible format.
19+
This function converts a Unicode domain name to an IDNA ASCII-compatible format in lowercase.
2020
</para>
2121
</refsect1>
2222

@@ -129,6 +129,24 @@ echo idn_to_ascii('täst.de');
129129
<screen>
130130
<![CDATA[
131131
xn--tst-qla.de
132+
]]>
133+
</screen>
134+
<example>
135+
<title>All-ASCII domain names are just converted to lowercase</title>
136+
<programlisting role="php">
137+
<![CDATA[
138+
<?php
139+
140+
var_dump(idn_to_ascii('Example.com'));
141+
142+
?>
143+
]]>
144+
</programlisting>
145+
</example>
146+
&example.outputs;
147+
<screen>
148+
<![CDATA[
149+
string(11) "example.com"
132150
]]>
133151
</screen>
134152
</refsect1>

0 commit comments

Comments
 (0)