mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-24 07:02:09 +01:00
167 lines
5.0 KiB
XML
167 lines
5.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 20216b916ed583938672cd09c2c2f430351430d1 Maintainer: leonardolara Status: ready -->
|
|
<refentry xml:id="function.variant-cmp" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>variant_cmp</refname>
|
|
<refpurpose>Compara duas variantes</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>variant_cmp</methodname>
|
|
<methodparam><type>mixed</type><parameter>left</parameter></methodparam>
|
|
<methodparam><type>mixed</type><parameter>right</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>locale_id</parameter><initializer><constant>LOCALE_SYSTEM_DEFAULT</constant></initializer></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Compara <parameter>left</parameter> com <parameter>right</parameter>.
|
|
</para>
|
|
<para>
|
|
Esta função apenas compara valores escalares, e não arrays ou registros de variantes.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>left</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
O termo da esquerda.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>right</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
O termo da direita.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>locale_id</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Um identificador de localidade válido a ser usado na comparação de strings (isso afeta
|
|
a ordem de comparação).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>flags</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<parameter>flags</parameter> pode ser uma ou mais das constantes a seguir,
|
|
combinadas com o operador binário OR, e afeta as comparações entre strings:
|
|
<table>
|
|
<title>Opções de Comparações entre Variantes</title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>valor</entry>
|
|
<entry>significado</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><constant>NORM_IGNORECASE</constant></entry>
|
|
<entry>Compara sem diferenciar maiúsculas de minúsculas</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>NORM_IGNORENONSPACE</constant></entry>
|
|
<entry>Ignora caracteres que não sejam de espaçamento</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>NORM_IGNORESYMBOLS</constant></entry>
|
|
<entry>Ignora símbolos</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>NORM_IGNOREWIDTH</constant></entry>
|
|
<entry>Ignora largura da string</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>NORM_IGNOREKANATYPE</constant></entry>
|
|
<entry>Ignora o tipo de Kana</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>NORM_IGNOREKASHIDA</constant></entry>
|
|
<entry>Ignora caracteres arábicos kashida</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
&com.variant-arith;
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retorna uma das seguintes constantes:
|
|
<table>
|
|
<title>Resultado de Comparação de Variantes</title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>valor</entry>
|
|
<entry>significado</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><constant>VARCMP_LT</constant></entry>
|
|
<entry><parameter>left</parameter> é menor que
|
|
<parameter>right</parameter>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>VARCMP_EQ</constant></entry>
|
|
<entry><parameter>left</parameter> é igual a
|
|
<parameter>right</parameter>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>VARCMP_GT</constant></entry>
|
|
<entry><parameter>left</parameter> é maior que
|
|
<parameter>right</parameter>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>VARCMP_NULL</constant></entry>
|
|
<entry><parameter>left</parameter>,
|
|
<parameter>right</parameter> ou ambos são &null;
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</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
|
|
-->
|