mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
Update
git-svn-id: https://svn.php.net/repository/phpdoc/pt_BR/trunk@249253 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.69 Maintainer: felipe Status: ready --><!-- CREDITS: ae -->
|
||||
<!-- EN-Revision: 1.70 Maintainer: felipe Status: ready --><!-- CREDITS: ae -->
|
||||
|
||||
<appendix xml:id="reserved" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Palavras reservadas do PHP</title>
|
||||
@@ -186,7 +186,7 @@
|
||||
<function>unset</function>
|
||||
</entry>
|
||||
<entry>
|
||||
use
|
||||
<link linkend="language.namespaces">use</link>
|
||||
</entry>
|
||||
<entry>
|
||||
<link linkend="keyword.class">var</link>
|
||||
@@ -265,16 +265,15 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry>
|
||||
<link linkend="language.namespaces">use</link> (no PHP 5.3)
|
||||
<link linkend="language.namespaces">__NAMESPACE__</link> (no PHP 5.3)
|
||||
</entry>
|
||||
<entry>
|
||||
<link linkend="language.namespaces">namespace</link> (no PHP 5.3)
|
||||
</entry>
|
||||
<entry>
|
||||
<link linkend="language.namespaces">__NAMESPACE__</link> (no PHP 5.3)
|
||||
goto (PHP 6 somente)
|
||||
</entry>
|
||||
<entry>
|
||||
goto (PHP 6 somente)
|
||||
</entry>
|
||||
<entry>
|
||||
</entry>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.73 Maintainer: narigone Status: ready -->
|
||||
<!-- EN-Revision: 1.74 Maintainer: narigone Status: ready -->
|
||||
<chapter xml:id="features.safe-mode" xmlns="http://docbook.org/ns/docbook">
|
||||
<title>Modo Seguro (Safe Mode)</title>
|
||||
|
||||
@@ -17,79 +17,79 @@
|
||||
</warning>
|
||||
|
||||
<sect1 xml:id="ini.sect.safe-mode">
|
||||
<title>Segurança e Modo Seguro</title>
|
||||
<para>
|
||||
<table>
|
||||
<title>Diretivas de Configuração de Segurança e Modo Seguro</title>
|
||||
<tgroup cols="4">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Nome</entry>
|
||||
<entry>Valor Padrão</entry>
|
||||
<entry>Alterável</entry>
|
||||
<entry>Changelog</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>safe_mode</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_gid</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Disponível desde o PHP 4.1.0. Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_include_dir</entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Disponível desde o PHP 4.1.0. Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_exec_dir</entry>
|
||||
<entry>""</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_allowed_env_vars</entry>
|
||||
<entry>"PHP_"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_protected_env_vars</entry>
|
||||
<entry>"LD_LIBRARY_PATH"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>open_basedir</entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry>PHP_INI_SYSTEM no PHP < 6.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>disable_functions</entry>
|
||||
<entry>""</entry>
|
||||
<entry>&php.ini; only</entry>
|
||||
<entry>Disponível desde o PHP 4.0.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>disable_classes</entry>
|
||||
<entry>""</entry>
|
||||
<entry>&php.ini; only</entry>
|
||||
<entry>Disponível desde o PHP 4.3.2.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
Para mais detalhes e definições das constantes PHP_INI_*, veja
|
||||
<function>ini_set</function>.
|
||||
<title>Segurança e Modo Seguro</title>
|
||||
<para>
|
||||
<table>
|
||||
<title>Diretivas de Configuração de Segurança e Modo Seguro</title>
|
||||
<tgroup cols="4">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Nome</entry>
|
||||
<entry>Valor Padrão</entry>
|
||||
<entry>Alterável</entry>
|
||||
<entry>Changelog</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>safe_mode</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_gid</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Disponível desde o PHP 4.1.0. Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_include_dir</entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Disponível desde o PHP 4.1.0. Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_exec_dir</entry>
|
||||
<entry>""</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_allowed_env_vars</entry>
|
||||
<entry>"PHP_"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>safe_mode_protected_env_vars</entry>
|
||||
<entry>"LD_LIBRARY_PATH"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Removido no PHP 6.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>open_basedir</entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry>PHP_INI_SYSTEM no PHP < 6.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>disable_functions</entry>
|
||||
<entry>""</entry>
|
||||
<entry>&php.ini; only</entry>
|
||||
<entry>Disponível desde o PHP 4.0.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>disable_classes</entry>
|
||||
<entry>""</entry>
|
||||
<entry>&php.ini; only</entry>
|
||||
<entry>Disponível desde o PHP 4.3.2.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
Para mais detalhes e definições das constantes PHP_INI_*, veja
|
||||
<function>ini_set</function>.
|
||||
</para>
|
||||
|
||||
&ini.descriptions.title;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.13 Maintainer: narigone Status: ready -->
|
||||
<!-- EN-Revision: 1.15 Maintainer: narigone Status: ready -->
|
||||
<sect1 xml:id="install.windows.building" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Compilando a partir dos fontes</title>
|
||||
<para>
|
||||
@@ -8,15 +8,108 @@
|
||||
linkend="install.unix"/>.
|
||||
</para>
|
||||
|
||||
<sect2 xml:id="install.windows.building.requirement">
|
||||
&reftitle.required;
|
||||
<sect2 xml:id="install.windows.building.environment">
|
||||
<title>Ambiente de compilação</title>
|
||||
<para>
|
||||
Para compilar e montar o PHP, você precisa de um Microsoft Development Environment.
|
||||
Microsoft Visual C++ 6.0 é recomendado, embora versões do Visual C++ .NET também
|
||||
funcionarão. A partir do PHP 5 as ferramentas grátis Microsoft .NET também são
|
||||
suportadas (você precisará instalar o Windows Platform SDK, Visual C++ Toolkit e
|
||||
o NET Framework SDK).
|
||||
Os seguintes ambientes são suportados:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Microsoft Visual C++ 6.0 (official)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Microsoft Visual C++ .NET
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Microsoft Visual C++ 2005, Windows Platform SDK e .NET Framework SDK (atual)
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
Embora VC6 (Microsoft Visual C++ 6.0) seja usado para executar oficiais compilações
|
||||
do Windows, ele não pode ser obtido do site da Microsoft. Novos usuários
|
||||
procurando compilar o PHP precisa usar Microsoft Visual C++ 2005 Express
|
||||
Edition e seus componentes auxiliares.
|
||||
</para>
|
||||
|
||||
<sect3 xml:id="install.windows.building.environment.express2005">
|
||||
<title>Configurando o Microsoft Visual C++ 2005 Express</title>
|
||||
<note>
|
||||
<simpara>
|
||||
Combinado, estes componentes são muito extenso e requisitará um
|
||||
gigabyte de espaço de disco.
|
||||
</simpara>
|
||||
</note>
|
||||
<para>
|
||||
Configurando o Microsoft Visual C++ 2005 Express é melhor contido,
|
||||
e requer a instalação de três pacotes separados e várias mudanças de
|
||||
compatibilidades. Mantenha uma lista de caminhos no qual
|
||||
estes programas estão sendo instalados. Faça download e instale
|
||||
os seguintes programas:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<link xlink:href="&url.win32.msvc2005express;">Microsoft Visual C++ 2005 Express</link>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<link xlink:href="&url.win32.platform-sdk;">Microsoft Windows Server 2005 Platform SDK</link>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<link xlink:href="&url.win32.net2.0-sdk;">.NET Framework 2.0 Software Development Kit</link>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
Há vários passos pós-instalação:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<link xlink:href="&url.win32.express-and-sdk;">MSVC 2005 Express precisa
|
||||
ser configurado para usar Windows Platform SDK</link>. Ele não é necessário
|
||||
para executar o segundo passo, como PHP não usa interface gráfica de usuário.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Windows Platform SDK contém um arquivo chamado <filename>WinResrc.h</filename>
|
||||
normalmente na pasta <filename>Include</filename> dentro do diretório de
|
||||
instalação do SDK. Este necessita ser copiado e renomeado para
|
||||
<filename>winres.h</filename>, o nome que o PHP usa para o arquivo.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
Finalmente, quando usando MSVC 2005 Express na linha de comando, várias
|
||||
variáveis de ambiente precisam ser definidas. <filename>vsvars32.bat</filename>
|
||||
normalmente encontradas em <filename>C:\Program Files\Microsoft Visual Studio 8\Common7\Tools</filename>
|
||||
(pesquise pelo arquivo caso contrário) contém estas declarações. As variáveis
|
||||
de ambiente <varname>PATH</varname>, <varname>INCLUDE</varname> e <varname>LIB</varname>
|
||||
precisam corresponder aos diretórios <filename>bin</filename>, <filename>include</filename> e
|
||||
<filename>lib</filename> dos dois recentes instalados SDK adicionado para eles.
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
O caminho do .NET SDK pode já estar presente no arquivo <filename>vsvars32.bat</filename>,
|
||||
como esta instalação do próprio SDK no mesmo diretório que o Microsoft Visual C++ 2005 Express.
|
||||
</simpara>
|
||||
</note>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="install.windows.building.libraries">
|
||||
<title>Bibliotecas</title>
|
||||
<para>
|
||||
Para extrair os arquivos baixados, você precisará de uma ferramenta que descompacte
|
||||
arquivos ZIP. O Windows XP e os mais novos já incluem essa funcionalidade embutida.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- EN-Revision: 1.36 Maintainer: felipe Status: ready --><!-- CREDITS: ae -->
|
||||
<!-- EN-Revision: 1.37 Maintainer: felipe Status: ready --><!-- CREDITS: ae -->
|
||||
|
||||
<!ENTITY PHPManual "Manual do PHP">
|
||||
<!ENTITY Date "Data:">
|
||||
@@ -9,6 +9,34 @@
|
||||
<!ENTITY Features "Características">
|
||||
<!ENTITY Security "Segurança">
|
||||
<!ENTITY FunctionReference "Referência das Funções">
|
||||
<!ENTITY VariableandTypeRelatedExtensions "Variável e Extensões Relacionadas aos Tipos">
|
||||
<!ENTITY TextProcessing "Processamento de Texto">
|
||||
<!ENTITY AffectingPHPsBehaviour "Afetando o comportamento do PHP">
|
||||
<!ENTITY SessionExtensions "Extensões de Sessão">
|
||||
<!ENTITY OtherBasicExtensions "Outras Básicas Extensões">
|
||||
<!ENTITY DatabaseExtensions "Extensões de Banco de Dados">
|
||||
<!ENTITY AbstractionLayers "Camadas de Abstração">
|
||||
<!ENTITY VendorSpecificDatabaseExtensions "Vendor Specific Database Extensions">
|
||||
<!ENTITY XMLManipulation "Manipulação de XML">
|
||||
<!ENTITY WebServices "Web Services">
|
||||
<!ENTITY CreditCardProcessing "Processamento de Cartão de Crédito">
|
||||
<!ENTITY MathematicalExtensions "Extensões Matemáticas">
|
||||
<!ENTITY CryptographyExtensions "Extensões para Criptografia">
|
||||
<!ENTITY HumanLanguageandCharacterEncodingSupport "Linguagem Humana e Suporte a Codificação de Caracteres">
|
||||
<!ENTITY FileSystemRelatedExtensions "Extensões Relacionadas a Sistema de Arquivo">
|
||||
<!ENTITY ProcessControlExtensions "Extensões para Controle de Processo">
|
||||
<!ENTITY MailRelatedExtensions "Extensões Relacionadas a Mail">
|
||||
<!ENTITY AuthenticationServices "Serviços de Autenticação">
|
||||
<!ENTITY OtherServices "Outros Serviços">
|
||||
<!ENTITY CompressionExtensions "Extensões de Compressão">
|
||||
<!ENTITY CalendarandEventRelatedExtensions "Extensões Relacionadas a Calendário e Evento">
|
||||
<!ENTITY NonTextMIMEOutput "Saída de MIME Não-Texto">
|
||||
<!ENTITY ImageProcessingandGeneration "Processamento de Imagem e Geração">
|
||||
<!ENTITY AudioFormatsManipulation "Manipulação de Formatos de Audio">
|
||||
<!ENTITY CommandLineSpecificExtensions "Extensões Específica para Linha de Comando">
|
||||
<!ENTITY WindowsOnlyExtensions "Extensões Somente para Windows">
|
||||
<!ENTITY ServerSpecificExtensions "Extensões Específicas para Servidor">
|
||||
<!ENTITY MiscExtensions "Extensões Miscelâneas">
|
||||
<!ENTITY PECLReference "Referência de Funções PECL">
|
||||
<!ENTITY AddOnReference "Referência de Funções AddOn">
|
||||
<!ENTITY Appendices "Apêndices">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.11 Maintainer: narigone Status: ready -->
|
||||
<!-- EN-Revision: 1.16 Maintainer: narigone Status: ready -->
|
||||
<section xml:id="apc.configuration" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
@@ -47,7 +47,7 @@
|
||||
<entry>apc.enabled</entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>PHP_INI_ALL no APC <= 3.0.12p2</entry>
|
||||
<entry>PHP_INI_SYSTEM no APC 2. PHP_INI_ALL no APC <= 3.0.12.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.shm_segments</entry>
|
||||
@@ -65,7 +65,7 @@
|
||||
<entry>apc.optimization</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry></entry>
|
||||
<entry>PHP_INI_SYSTEM no APC 2. Removido no APC 3.0.13.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.num_files_hint</entry>
|
||||
@@ -77,19 +77,19 @@
|
||||
<entry>apc.user_entries_hint</entry>
|
||||
<entry>"4096"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
<entry>Disponível desde o APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.ttl</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
<entry>Disponível desde o APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.user_ttl</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
<entry>Disponível desde o APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.gc_ttl</entry>
|
||||
@@ -101,7 +101,7 @@
|
||||
<entry>apc.cache_by_default</entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry>PHP_INI_SYSTEM no APC <= 3.0.12p2</entry>
|
||||
<entry>PHP_INI_SYSTEM no APC <= 3.0.12p. Disponível desde o APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.filters</entry>
|
||||
@@ -119,67 +119,85 @@
|
||||
<entry>apc.slam_defense</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
<entry>Disponível desde o APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.file_update_protection</entry>
|
||||
<entry>"2"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
<entry>Disponível desde o APC 3.0.6.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.enable_cli</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>> APC 3.0.6</entry>
|
||||
<entry>Disponível desde o APC 3.0.7.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.max_file_size</entry>
|
||||
<entry>"1M"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>> APC 3.0.6</entry>
|
||||
<entry>Disponível desde o APC 3.0.7.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.stat</entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>> APC 3.0.9</entry>
|
||||
<entry>Disponível desde o APC 3.0.10.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.write_lock</entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>>= APC 3.0.11</entry>
|
||||
<entry>Disponível desde o APC 3.0.11.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.report_autofilter</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>>= APC 3.0.11</entry>
|
||||
<entry>Disponível desde o APC 3.0.11.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.include_once_override</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>>= APC 3.0.12</entry>
|
||||
<entry>Disponível desde o APC 3.0.12.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.rfc1867</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>>= APC 3.0.13</entry>
|
||||
<entry>Disponível desde o APC 3.0.13.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.rfc1867_prefix</entry>
|
||||
<entry>"upload_"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.rfc1867_name</entry>
|
||||
<entry>"APC_UPLOAD_PROGRESS"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.rfc1867_freq</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.localcache</entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>>= APC 3.0.14</entry>
|
||||
<entry>Disponível desde o APC 3.0.14.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apc.localcache.size</entry>
|
||||
<entry>"512"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>>= APC 3.0.14</entry>
|
||||
<entry>Disponível desde o APC 3.0.14.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
@@ -401,6 +419,9 @@
|
||||
uma "race condition". Configurando isso para <literal>0</literal>
|
||||
desabilita essa funcionalidade.
|
||||
</para>
|
||||
<para>
|
||||
Obsoleto por <link linkend="ini.apc.write-lock">apc.write_lock</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apc.file-update-protection">
|
||||
@@ -578,6 +599,50 @@ Array
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.rfc1867_prefix">
|
||||
<term>
|
||||
<parameter>apc.rfc1867_prefix</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Chave do prefixo para usar por entrada de cache do usuário gerado pela
|
||||
funcionalidade de progresso de upload rfc1867.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.rfc1867_name">
|
||||
<term>
|
||||
<parameter>apc.rfc1867_name</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Especifica o escondido nome de entrada de formulário que ativa o progresso
|
||||
de upload do APC e especifica o sufixo da chave de cache do usuário.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.rfc1867_freq">
|
||||
<term>
|
||||
<parameter>apc.rfc1867_freq</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A freqüência de atualização que deve ser feita para a entrada de cache do
|
||||
usuário para o progresso do upload. Isto pode ser obtido do formulário de
|
||||
uma porcentagem do total do tamanho do arquivo em bytes opcionalmente
|
||||
sufixado com 'k', 'm', ou 'g' por kilobytes, megabytes, ou gigabytes
|
||||
respectivamente (case insensitive).
|
||||
Definindo para 0 atualizações serão feitas sempre que possível,
|
||||
que pode causar lentidão no upload.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.localcache">
|
||||
<term>
|
||||
<parameter>apc.localcache</parameter>
|
||||
|
||||
@@ -1,30 +1,73 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.12 Maintainer: narigone Status: ready -->
|
||||
<!-- CREDITS: lucasr -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.14 -->
|
||||
<refentry xml:id="function.array-intersect" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_intersect</refname>
|
||||
<refpurpose>Calcula a interseção entre arrays</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Descrição</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_intersect</methodname>
|
||||
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>array_intersect</function> retorna um array
|
||||
contendo todos os valores de <parameter>array1</parameter>
|
||||
que estão presentes nos outros argumentos.
|
||||
Note que as chaves são preservadas.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Exemplo de <function>array_intersect</function></title>
|
||||
<programlisting role="php">
|
||||
<!-- EN-Revision: 1.14 Maintainer: felipe Status: ready --><!-- CREDITS: narigone, lucasr -->
|
||||
<refentry xml:id="function.array-intersect" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_intersect</refname>
|
||||
<refpurpose>Calcula a interseção entre arrays</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>array_intersect</methodname>
|
||||
<methodparam><type>array</type><parameter>array1</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>array2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>array_intersect</function> retorna um array
|
||||
contendo todos os valores de <parameter>array1</parameter>
|
||||
que estão presentes nos outros argumentos.
|
||||
Note que as chaves são preservadas.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O array com os valores que serão verificados.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Um array para comparar os valores.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>array</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Uma lista variável de arrays para comparar.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna um array contendo todos os valores em
|
||||
<parameter>array1</parameter> cujo existem em todos os parâmetros.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Exemplo da <function>array_intersect</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$array1 = array("a" => "verde", "vermelho", "azul");
|
||||
@@ -43,23 +86,34 @@ Array
|
||||
[0] => vermelho
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
Dois elementos são considerados iguais se, e somente se,
|
||||
<literal>(string) $elem1 === (string) $elem2</literal>. Em palavras:
|
||||
quando a representação em string é a mesma.
|
||||
<!-- TODO: example of it... -->
|
||||
</simpara>
|
||||
</note>
|
||||
<para>
|
||||
Veja também <function>array_intersect_assoc</function>, <function>array_diff</function>
|
||||
e <function>array_diff_assoc</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<note>
|
||||
<simpara>
|
||||
Dois elementos são considerados iguais se, e somente se,
|
||||
<literal>(string) $elem1 === (string) $elem2</literal>. Em palavras:
|
||||
quando a representação em string é a mesma.
|
||||
<!-- TODO: example of it... -->
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>array_intersect_assoc</function></member>
|
||||
<member><function>array_diff</function></member>
|
||||
<member><function>array_diff_assoc</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.2 Maintainer: felipe Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: felipe Status: ready -->
|
||||
|
||||
<book xml:id="book.libxml" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>libxml</title>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.10 Maintainer: ae Status: ready --><!-- CREDITS: rarruda -->
|
||||
<!-- EN-Revision: 1.11 Maintainer: ae Status: ready --><!-- CREDITS: rarruda -->
|
||||
<refentry xml:id="function.floor" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>floor</refname>
|
||||
@@ -9,7 +9,7 @@
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>floor</methodname>
|
||||
<methodparam><type>float</type><parameter>valor</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Retorna o próximo menor valor inteiro ao se arredondar para baixo o
|
||||
@@ -34,7 +34,7 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<parameter>arg</parameter> arredondado para o inteiro menor.
|
||||
<parameter>value</parameter> arredondado para o inteiro menor.
|
||||
O valor retornado de <function>floor</function> é do tipo
|
||||
<type>float</type> porque o tipo <type>float</type> normalmente
|
||||
abrange mais números possíveis do que <type>integer</type>.
|
||||
|
||||
@@ -1,27 +1,59 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.4 Maintainer: kappu Status: ready -->
|
||||
<!-- splitted from ./en/functions/var.xml, last change in rev 1.75 -->
|
||||
<refentry xml:id="function.get-resource-type" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>get_resource_type</refname>
|
||||
<refpurpose>
|
||||
Retorna o tipo de resource
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Descrição</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>get_resource_type</methodname>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Essa função retorna uma string que representa o tipo
|
||||
<type>resource</type>. Se o parâmetro não for um
|
||||
<type>resource</type> válido um erro será retornado.
|
||||
</para>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<!-- EN-Revision: 1.9 Maintainer: kappu Status: ready -->
|
||||
<refentry xml:id="function.get-resource-type" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>get_resource_type</refname>
|
||||
<refpurpose>
|
||||
Retorna o tipo de resource
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>get_resource_type</methodname>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Essa função obtém o tipo do dado resource.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>handle</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
O manipulador resource a ser avaliado.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Se o dado <parameter>handle</parameter> é um resource, esta função
|
||||
retornará a string representando seu tipo. Se o tipo não é identificado
|
||||
por esta função, o valor retornado será a string <literal>Unknown</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Esta função retornará &false; e gera um erro se
|
||||
<parameter>handle</parameter> não for um <type>resource</type>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Exemplo da <function>get_resource_type</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// mosta: mysql link
|
||||
@@ -37,11 +69,11 @@ $doc = new xmldoc("1.0");
|
||||
echo get_resource_type($doc->doc)."\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
@@ -1,34 +1,64 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.2 Maintainer: kappu Status: ready -->
|
||||
<!-- splitted from ./en/functions/var.xml, last change in rev 1.14 -->
|
||||
<refentry xml:id="function.is-numeric" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>is_numeric</refname>
|
||||
<refpurpose>
|
||||
Informa se a variável é um número ou uma string numérica
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Descrição</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_numeric</methodname>
|
||||
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Retorna &true; se <parameter>var</parameter> é um número ou uma
|
||||
string numérica, &false; senão.
|
||||
</para>
|
||||
<para>
|
||||
Veja mais em <function>is_bool</function>,
|
||||
<function>is_float</function>,
|
||||
<function>is_int</function>,
|
||||
<function>is_string</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_array</function> e
|
||||
<function>is_integer</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- EN-Revision: 1.6 Maintainer: kappu Status: ready -->
|
||||
<refentry xml:id="function.is-numeric" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>is_numeric</refname>
|
||||
<refpurpose>
|
||||
Informa se a variável é um número ou uma string numérica
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Descrição</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_numeric</methodname>
|
||||
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Verifica se a dada variável é numérica. Strings numéricas consistem de
|
||||
um sinal opcional, algum número de dígitos, opcional parte decimal e
|
||||
opcional parte exponencial. Assim <literal>+0123.45e6</literal> é um válido
|
||||
valor numérico. Notação hexadecimal (<literal>0xFF</literal>) é permitida também
|
||||
mas somente sem sinal, decimal e parte exponencial.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A variável a ser avaliada.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna &true; se <parameter>var</parameter> é um número ou uma string
|
||||
numérica, &false; caso contrário.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ctype_digit</function></member>
|
||||
<member><function>is_bool</function></member>
|
||||
<member><function>is_null</function></member>
|
||||
<member><function>is_float</function></member>
|
||||
<member><function>is_int</function></member>
|
||||
<member><function>is_string</function></member>
|
||||
<member><function>is_object</function></member>
|
||||
<member><function>is_array</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
@@ -1,36 +1,74 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- EN-Revision: 1.4 Maintainer: kappu Status: ready -->
|
||||
<!-- splitted from ./en/functions/var.xml, last change in rev 1.35 -->
|
||||
<refentry xml:id="function.is-scalar" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>is_scalar</refname>
|
||||
<refpurpose>
|
||||
Informa se é uma váriavel escalar
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Descrição</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_scalar</methodname>
|
||||
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>is_scalar</function> retorna &true; se a variável
|
||||
<parameter>var</parameter> for escalar, &false;
|
||||
senão.
|
||||
</para>
|
||||
<para>
|
||||
Variáveis escalares são as que contém <type>integer</type>,
|
||||
<type>float</type>, <type>string</type> ou <type>boolean</type>.
|
||||
os tipos <type>array</type>, <type>object</type> e <type>resource</type>
|
||||
não são escalares.
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<!-- EN-Revision: 1.9 Maintainer: kappu Status: ready -->
|
||||
<refentry xml:id="function.is-scalar" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>is_scalar</refname>
|
||||
<refpurpose>
|
||||
Informa se é uma váriavel escalar
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_scalar</methodname>
|
||||
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Verifica se a dada variável é uma escalar.
|
||||
</para>
|
||||
<para>
|
||||
Variáveis escalares são as que contém <type>integer</type>,
|
||||
<type>float</type>, <type>string</type> ou <type>boolean</type>.
|
||||
os tipos <type>array</type>, <type>object</type> e <type>resource</type>
|
||||
não são escalares.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
<function>is_scalar</function> não considera o tipo <type>resource</type>
|
||||
como um valor escalar, apesar de tipos resouce ser uma abstração de dados,
|
||||
atualmente baseados em inteiros. Esse detalhe de implementação
|
||||
poderá ser modificado futuramente.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A variável a ser avaliada.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Retorna &true; se <parameter>var</parameter> é um escalar, &false;
|
||||
caso contrário.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Exemplo da <function>is_scalar</function></title>
|
||||
<programlisting role="php">
|
||||
<!-- TODO: better example, this one can be quite misleading for unexperienced
|
||||
programmers. -->
|
||||
<![CDATA[
|
||||
<?php
|
||||
function show_var($var) {
|
||||
function show_var($var)
|
||||
{
|
||||
if (is_scalar($var)) {
|
||||
echo $var;
|
||||
} else {
|
||||
@@ -41,44 +79,45 @@ $pi = 3.1416;
|
||||
$proteins = array("hemoglobin", "cytochrome c oxidase", "ferredoxin");
|
||||
|
||||
show_var($pi);
|
||||
// prints: 3.1416
|
||||
|
||||
show_var($proteins)
|
||||
// prints:
|
||||
// array(3) {
|
||||
// [0]=>
|
||||
// string(10) "hemoglobin"
|
||||
// [1]=>
|
||||
// string(20) "cytochrome c oxidase"
|
||||
// [2]=>
|
||||
// string(10) "ferredoxin"
|
||||
// }
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
<function>is_scalar</function> não considera o tipo <type>resource</type>
|
||||
como um valor escalar, apesar de tipos resouce ser uma abstração de dados,
|
||||
atualmente baseados em inteiros. Esse detalhe de implementação
|
||||
poderá ser modificado futuramente.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
Veja mais em <function>is_bool</function>,
|
||||
<function>is_numeric</function>,
|
||||
<function>is_float</function>,
|
||||
<function>is_int</function>,
|
||||
<function>is_real</function>,
|
||||
<function>is_string</function>,
|
||||
<function>is_object</function>,
|
||||
<function>is_array</function> e
|
||||
<function>is_integer</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
3.1416
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(10) "hemoglobin"
|
||||
[1]=>
|
||||
string(20) "cytochrome c oxidase"
|
||||
[2]=>
|
||||
string(10) "ferredoxin"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>is_float</function></member>
|
||||
<member><function>is_int</function></member>
|
||||
<member><function>is_numeric</function></member>
|
||||
<member><function>is_real</function></member>
|
||||
<member><function>is_string</function></member>
|
||||
<member><function>is_bool</function></member>
|
||||
<member><function>is_object</function></member>
|
||||
<member><function>is_array</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
Reference in New Issue
Block a user