mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
* Atualiza migration81/constants.xml * Atualiza features/file-upload.xml * Atualiza switch.xml * Atualiza autoload.xml * Atualiza funções de array
116 lines
3.0 KiB
XML
116 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 2c0d7af2fd69ecd914abec5cfebae53aca8d491f Maintainer: lhsazevedo Status: ready --><!-- CREDITS: lucasr, fabioluciano, lhsazevedo -->
|
|
<refentry xml:id="function.array-change-key-case" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>array_change_key_case</refname>
|
|
<refpurpose>Modifica a caixa de todas as chaves em um array</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>array_change_key_case</methodname>
|
|
<methodparam><type>array</type><parameter>array</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>case</parameter><initializer><constant>CASE_LOWER</constant></initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Retorna um array com todas as chaves de <parameter>input</parameter> em
|
|
minúsculo ou maiúsculo. Índices numéricos são mantidos como são.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
<term><parameter>input</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
O array a ser modificado
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><parameter>case</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Tanto <constant>CASE_UPPER</constant> quanto
|
|
<constant>CASE_LOWER</constant> (padrão)
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retorna um array com as chaves em minúsculo ou maiúsculo, ou &null; se
|
|
<parameter>input</parameter> não for um array.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example xml:id="function.array-change-key-case.example-1">
|
|
<title>Exemplo da função <function>array_change_key_case</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$input_array = array("primeiRo" => 1, "segunDo" => 4);
|
|
print_r(array_change_key_case($input_array, CASE_UPPER);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[PRIMEIRO] => 1
|
|
[SEGUNDO] => 2
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
Se uma matriz tem índices que serão os mesmos após a utilização desta função
|
|
(ex: "<literal>chaVE</literal>" e "<literal>CHave</literal>"), o valor que estiver ao final do array
|
|
irá sobrescrever os outros índices.
|
|
</para>
|
|
</note>
|
|
</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
|
|
-->
|