mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Documented mb_encoding_aliases()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299347 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
54429d1a2d
commit
701a371eca
2 changed files with 125 additions and 1 deletions
124
reference/mbstring/functions/mb-encoding-aliases.xml
Normal file
124
reference/mbstring/functions/mb-encoding-aliases.xml
Normal file
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.mb-encoding-aliases" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>mb_encoding_aliases</refname>
|
||||
<refpurpose>Get aliases of a known encoding type</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>mb_encoding_aliases</methodname>
|
||||
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns an array of aliases for a known <parameter>encoding</parameter> type.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>encoding</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The encoding type being checked, for aliases.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a numerically indexed array of encoding aliases on success,
|
||||
&return.falseforfailure;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Emits an <constant>E_WARNING</constant> level error if
|
||||
<parameter>encoding</parameter> is unknown.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>mb_encoding_aliases</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$encoding = 'ASCII';
|
||||
$known_encodings = mb_list_encodings();
|
||||
|
||||
if (in_array($encoding, $known_encodings)) {
|
||||
|
||||
$aliases = mb_encoding_aliases($encoding);
|
||||
print_r($aliases);
|
||||
|
||||
} else {
|
||||
|
||||
echo "Unknown ($encoding) encoding.\n";
|
||||
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[0] => ANSI_X3.4-1968
|
||||
[1] => iso-ir-6
|
||||
[2] => ANSI_X3.4-1986
|
||||
[3] => ISO_646.irv:1991
|
||||
[4] => US-ASCII
|
||||
[5] => ISO646-US
|
||||
[6] => us
|
||||
[7] => IBM367
|
||||
[8] => cp367
|
||||
[9] => csASCII
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>mb_list_encodings</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
<function name='mb_detect_order' from='PHP 4 >= 4.0.6, PHP 5'/>
|
||||
<function name='mb_encode_mimeheader' from='PHP 4 >= 4.0.6, PHP 5'/>
|
||||
<function name='mb_encode_numericentity' from='PHP 4 >= 4.0.6, PHP 5'/>
|
||||
<function name='mb_encoding_aliases' from='PHP 5 >= 5.3.0'/>
|
||||
<function name='mb_ereg' from='PHP 4 >= 4.2.0, PHP 5'/>
|
||||
<function name='mb_ereg_match' from='PHP 4 >= 4.2.0, PHP 5'/>
|
||||
<function name='mb_ereg_replace' from='PHP 4 >= 4.2.0, PHP 5'/>
|
||||
|
@ -33,7 +34,6 @@
|
|||
<function name='mb_internal_encoding' from='PHP 4 >= 4.0.6, PHP 5'/>
|
||||
<function name='mb_language' from='PHP 4 >= 4.0.6, PHP 5'/>
|
||||
<function name='mb_list_encodings' from='PHP 5'/>
|
||||
<function name='mb_list_encodings_alias_names' from='PHP 5 >= 5.2.0'/>
|
||||
<function name='mb_list_mime_names' from='PHP 5 >= 5.2.0'/>
|
||||
<function name='mb_output_handler' from='PHP 4 >= 4.0.6, PHP 5'/>
|
||||
<function name='mb_parse_str' from='PHP 4 >= 4.0.6, PHP 5'/>
|
||||
|
|
Loading…
Reference in a new issue