<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Filter Functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="Referência das Funções" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="unlink" HREF="function.unlink.html"><LINK REL="NEXT" TITLE="filter_has_var" HREF="function.filter-has-var.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.unlink.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.filter-has-var.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.filter" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >XLI. Filter Functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN50847" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="filter.intro" >Introdução</A ></H1 ><P > This extension serves for validating and filtering data coming usually from some insecure source such as user input. </P ><P > The following filters currently exist, be sure to read the <A HREF="ref.filter.html#filter.constants" >Filter Constants</A > section for information that describes the behavior of each constant: <DIV CLASS="table" ><A NAME="AEN50853" ></A ><P ><B >Tabela 1. Existing filters</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><COL><COL><THEAD ><TR ><TH >ID</TH ><TH >Name</TH ><TH >Options</TH ><TH >Flags</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD ><TT CLASS="constant" ><B >FILTER_VALIDATE_INT</B ></TT ></TD ><TD >"int"</TD ><TD > <CODE CLASS="parameter" >min_range</CODE >, <CODE CLASS="parameter" >max_range</CODE > </TD ><TD > <TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_OCTAL</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_HEX</B ></TT > </TD ><TD >Validates value as integer, optionally from the specified range.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_VALIDATE_BOOLEAN</B ></TT ></TD ><TD >"boolean"</TD ><TD > </TD ><TD > </TD ><TD > Returns <TT CLASS="constant" ><B >TRUE</B ></TT > for "1", "true", "on" and "yes", <TT CLASS="constant" ><B >FALSE</B ></TT > for "0", "false", "off", "no", and "", <TT CLASS="constant" ><B >NULL</B ></TT > otherwise. </TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_VALIDATE_FLOAT</B ></TT ></TD ><TD >"float"</TD ><TD > </TD ><TD > </TD ><TD >Validates value as float.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_VALIDATE_REGEXP</B ></TT ></TD ><TD >"validate_regexp"</TD ><TD > <CODE CLASS="parameter" >regexp</CODE > </TD ><TD > </TD ><TD > Validates value against <CODE CLASS="parameter" >regexp</CODE >, a <A HREF="ref.pcre.html" >Perl-compatible</A > regular expression. </TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_VALIDATE_URL</B ></TT ></TD ><TD >"validate_url"</TD ><TD > </TD ><TD > <TT CLASS="constant" ><B >FILTER_FLAG_SCHEME_REQUIRED</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_HOST_REQUIRED</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_PATH_REQUIRED</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_QUERY_REQUIRED</B ></TT > </TD ><TD >Validates value as URL, optionally with required components.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_VALIDATE_EMAIL</B ></TT ></TD ><TD >"validate_email"</TD ><TD > </TD ><TD > </TD ><TD >Validates value as e-mail.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_VALIDATE_IP</B ></TT ></TD ><TD >"validate_ip"</TD ><TD > </TD ><TD > <TT CLASS="constant" ><B >FILTER_FLAG_IPV4</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_IPV6</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_NO_PRIV_RANGE</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_NO_RES_RANGE</B ></TT > </TD ><TD > Validates value as IP address, optionally only IPv4 or IPv6 or not from private or reserved ranges. </TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_STRING</B ></TT ></TD ><TD >"string"</TD ><TD > </TD ><TD > <TT CLASS="constant" ><B >FILTER_FLAG_NO_ENCODE_QUOTES</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_STRIP_LOW</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_STRIP_HIGH</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_LOW</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_HIGH</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_AMP</B ></TT > </TD ><TD >Strip tags, optionally strip or encode special characters.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_STRIPPED</B ></TT ></TD ><TD >"stripped"</TD ><TD > </TD ><TD > </TD ><TD >Alias of "string" filter.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_ENCODED</B ></TT ></TD ><TD >"encoded"</TD ><TD > </TD ><TD > <TT CLASS="constant" ><B >FILTER_FLAG_STRIP_LOW</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_STRIP_HIGH</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_LOW</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_HIGH</B ></TT > </TD ><TD >URL-encode string, optionally strip or encode special characters.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_SPECIAL_CHARS</B ></TT ></TD ><TD >"special_chars"</TD ><TD > </TD ><TD > <TT CLASS="constant" ><B >FILTER_FLAG_STRIP_LOW</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_STRIP_HIGH</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_HIGH</B ></TT > </TD ><TD > HTML-escape <TT CLASS="literal" >'"<>&</TT > and characters with ASCII value less than 32, optionally strip or encode other special characters. </TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_UNSAFE_RAW</B ></TT ></TD ><TD >"unsafe_raw"</TD ><TD > </TD ><TD > <TT CLASS="constant" ><B >FILTER_FLAG_STRIP_LOW</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_STRIP_HIGH</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_LOW</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_HIGH</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_AMP</B ></TT > </TD ><TD >Do nothing, optionally strip or encode special characters.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_EMAIL</B ></TT ></TD ><TD >"email"</TD ><TD > </TD ><TD > </TD ><TD > Remove all characters except letters, digits and <TT CLASS="literal" >!#$%&'*+-/=?^_`{|}~@.[]</TT >. </TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_URL</B ></TT ></TD ><TD >"url"</TD ><TD > </TD ><TD > </TD ><TD > Remove all characters except letters, digits and <TT CLASS="literal" >$-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=</TT >. </TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_NUMBER_INT</B ></TT ></TD ><TD >"number_int"</TD ><TD > </TD ><TD > </TD ><TD > Remove all characters except digits and <TT CLASS="literal" >+-</TT >. </TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_NUMBER_FLOAT</B ></TT ></TD ><TD >"number_float"</TD ><TD > </TD ><TD > <TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_FRACTION</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_THOUSAND</B ></TT >, <TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_SCIENTIFIC</B ></TT > </TD ><TD > Remove all characters except digits, <TT CLASS="literal" >+-</TT > and optionally <TT CLASS="literal" >.,eE</TT >. </TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_SANITIZE_MAGIC_QUOTES</B ></TT ></TD ><TD >"magic_quotes"</TD ><TD > </TD ><TD > </TD ><TD >Apply <A HREF="function.addslashes.html" ><B CLASS="function" >addslashes()</B ></A >.</TD ></TR ><TR ><TD ><TT CLASS="constant" ><B >FILTER_CALLBACK</B ></TT ></TD ><TD >"callback"</TD ><TD > </TD ><TD ><A HREF="language.pseudo-types.html#language.types.callback" ><B CLASS="type" >callback</B ></A > function or method</TD ><TD >Call user-defined function to filter data.</TD ></TR ></TBODY ></TABLE ></DIV > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="filter.requirements" >Dependências</A ></H1 ><P >Nenhuma biblioteca externa é necessária para compilar esta extensão.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="filter.installation" >Instalação</A ></H1 ><P > A short installation note: just type <TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="screen" >$ pecl install filter</PRE ></TD ></TR ></TABLE > in your console. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="filter.configuration" >Configurações em execução</A ></H1 ><P > O comportamento dessas funções podem ser modificado pelas configurações do <TT CLASS="filename" >php.ini</TT >. </P ><P > <DIV CLASS="table" ><A NAME="AEN51049" ></A ><P ><B >Tabela 2. Filter Configuration Options</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><COL><COL><THEAD ><TR ><TH >Name</TH ><TH >Default</TH ><TH >Changeable</TH ><TH >Changelog</TH ></TR ></THEAD ><TBODY ><TR ><TD >filter.default</TD ><TD >unsafe_raw</TD ><TD >PHP_INI_PERDIR</TD ><TD > </TD ></TR ><TR ><TD >filter.default_flags</TD ><TD > </TD ><TD >PHP_INI_PERDIR</TD ><TD > </TD ></TR ></TBODY ></TABLE ></DIV > Para mais detalhes e definições das constantes PHP_INI_*, veja <A HREF="ini.html" >Apêndice H</A >. </P ><P >Breve descrição das diretivas de configuração.</P ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><A NAME="ini.filter.default" ></A ><CODE CLASS="parameter" >filter.default</CODE > <A HREF="language.types.string.html" ><B CLASS="type" >string</B ></A ></DT ><DD ><P > Filter all $_GET, $_POST, $_COOKIE and $_REQUEST data by this filter. Original data can be accessed through <A HREF="function.filter-input.html" ><B CLASS="function" >filter_input()</B ></A >. </P ><P > Accepts the name of the filter you like to use by default. See the existing filter list for the list of the filter names. </P ></DD ><DT ><A NAME="ini.filter.default-flags" ></A ><CODE CLASS="parameter" >filter.default_flags</CODE > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > Default flags </P ></DD ></DL ></DIV > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="filter.resources" >Tipos Resource</A ></H1 ><P >Esta extensão não possui nenhum tipo resource.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="filter.constants" >Constantes pré-definidas</A ></H1 ><P > As contantes abaixo são definidas por esta extensão e somente estarão disponíveis quando a extensão foi compilada com o PHP ou carregada dinamicamente durante a execução. </P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><TT CLASS="constant" ><B >INPUT_POST</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > <A HREF="reserved.variables.html#reserved.variables.post" >POST</A > variables. </P ></DD ><DT ><TT CLASS="constant" ><B >INPUT_GET</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > <A HREF="reserved.variables.html#reserved.variables.get" >GET</A > variables. </P ></DD ><DT ><TT CLASS="constant" ><B >INPUT_COOKIE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > <A HREF="reserved.variables.html#reserved.variables.cookies" >COOKIE</A > variables. </P ></DD ><DT ><TT CLASS="constant" ><B >INPUT_ENV</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > <A HREF="reserved.variables.html#reserved.variables.environment" >ENV</A > variables. </P ></DD ><DT ><TT CLASS="constant" ><B >INPUT_SERVER</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > <A HREF="reserved.variables.html#reserved.variables.server" >SERVER</A > variables. </P ></DD ><DT ><TT CLASS="constant" ><B >INPUT_SESSION</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > <A HREF="reserved.variables.html#reserved.variables.session" >SESSION</A > variables. (not implemented yet) </P ></DD ><DT ><TT CLASS="constant" ><B >INPUT_REQUEST</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > <A HREF="reserved.variables.html#reserved.variables.request" >REQUEST</A > variables. (not implemented yet) </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_NONE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > No flags. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_REQUIRE_SCALAR</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Flag used to require scalar as input </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_REQUIRE_ARRAY</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Require an array as input. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FORCE_ARRAY</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Always returns an array. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_NULL_ON_FAILURE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Use NULL instead of FALSE on failure. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_VALIDATE_INT</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "int" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_VALIDATE_BOOLEAN</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "boolean" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_VALIDATE_FLOAT</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "float" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_VALIDATE_REGEXP</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "validate_regexp" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_VALIDATE_URL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "validate_url" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_VALIDATE_EMAIL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "validate_email" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_VALIDATE_IP</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "validate_ip" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_DEFAULT</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of default ("string") filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_UNSAFE_RAW</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "unsafe_raw" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_STRING</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "string" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_STRIPPED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "stripped" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_ENCODED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "encoded" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_SPECIAL_CHARS</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "special_chars" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_EMAIL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "email" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_URL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "url" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_NUMBER_INT</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "number_int" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_NUMBER_FLOAT</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "number_float" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_SANITIZE_MAGIC_QUOTES</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "magic_quotes" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_CALLBACK</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > ID of "callback" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_OCTAL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Allow octal notation (<TT CLASS="literal" >0[0-7]+</TT >) in "int" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_HEX</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Allow hex notation (<TT CLASS="literal" >0x[0-9a-fA-F]+</TT >) in "int" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_STRIP_LOW</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Strip characters with ASCII value less than 32. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_STRIP_HIGH</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Strip characters with ASCII value greater than 127. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_LOW</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Encode characters with ASCII value less than 32. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_HIGH</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Encode characters with ASCII value greater than 127. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_ENCODE_AMP</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Encode <TT CLASS="literal" >&</TT >. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_NO_ENCODE_QUOTES</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Don't encode <TT CLASS="literal" >'</TT > and <TT CLASS="literal" >"</TT >. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_EMPTY_STRING_NULL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > (No use for now.) </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_FRACTION</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Allow fractional part in "number_float" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_THOUSAND</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Allow thousand separator (<TT CLASS="literal" >,</TT >) in "number_float" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_ALLOW_SCIENTIFIC</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Allow scientific notation (<TT CLASS="literal" >e</TT >, <TT CLASS="literal" >E</TT >) in "number_float" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_SCHEME_REQUIRED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Require scheme in "validate_url" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_HOST_REQUIRED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Require host in "validate_url" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_PATH_REQUIRED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Require path in "validate_url" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_QUERY_REQUIRED</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Require query in "validate_url" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_IPV4</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Allow only IPv4 address in "validate_ip" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_IPV6</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Allow only IPv6 address in "validate_ip" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_NO_RES_RANGE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Deny reserved addresses in "validate_ip" filter. </P ></DD ><DT ><TT CLASS="constant" ><B >FILTER_FLAG_NO_PRIV_RANGE</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > Deny private addresses in "validate_ip" filter. </P ></DD ></DL ></DIV ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Índice</B ></DT ><DT ><A HREF="function.filter-has-var.html" >filter_has_var</A > -- Checks if variable of specified type exists</DT ><DT ><A HREF="function.filter-id.html" >filter_id</A > -- Returns the filter ID belonging to a named filter</DT ><DT ><A HREF="function.filter-input-array.html" >filter_input_array</A > -- Gets multiple variables from outside PHP and optionally filters them</DT ><DT ><A HREF="function.filter-input.html" >filter_input</A > -- Gets variable from outside PHP and optionally filters it</DT ><DT ><A HREF="function.filter-list.html" >filter_list</A > -- Returns a list of all supported filters</DT ><DT ><A HREF="function.filter-var-array.html" >filter_var_array</A > -- Gets multiple variables and optionally filters them</DT ><DT ><A HREF="function.filter-var.html" >filter_var</A > -- Filters a variable with a specified filter</DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.unlink.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.filter-has-var.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >unlink</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >filter_has_var</TD ></TR ></TABLE ></DIV ></BODY ></HTML >