<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Predefined Constants</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="filter.filters.flags.html">Filter flags</a></div> <div class="next" style="text-align: right; float: right;"><a href="filter.examples.html">Examples</a></div> <div class="up"><a href="book.filter.html">Filter</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="filter.constants" class="appendix"> <h1>Predefined Constants</h1> <p class="simpara"> The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime. </p> <dl> <dt id="constant.input-post"> <span class="term"> <strong><code>INPUT_POST</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> <a href="reserved.variables.post.html" class="link">POST</a> variables. </span> </dd> </dt> <dt id="constant.input-get"> <span class="term"> <strong><code>INPUT_GET</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> <a href="reserved.variables.get.html" class="link">GET</a> variables. </span> </dd> </dt> <dt id="constant.input-cookie"> <span class="term"> <strong><code>INPUT_COOKIE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> <a href="reserved.variables.cookies.html" class="link">COOKIE</a> variables. </span> </dd> </dt> <dt id="constant.input-env"> <span class="term"> <strong><code>INPUT_ENV</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> <a href="reserved.variables.environment.html" class="link">ENV</a> variables. </span> </dd> </dt> <dt id="constant.input-server"> <span class="term"> <strong><code>INPUT_SERVER</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> <a href="reserved.variables.server.html" class="link">SERVER</a> variables. </span> </dd> </dt> <dt id="constant.input-session"> <span class="term"> <strong><code>INPUT_SESSION</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> <a href="reserved.variables.session.html" class="link">SESSION</a> variables. (not implemented yet) </span> </dd> </dt> <dt id="constant.input-request"> <span class="term"> <strong><code>INPUT_REQUEST</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> <a href="reserved.variables.request.html" class="link">REQUEST</a> variables. (not implemented yet) </span> </dd> </dt> <dt id="constant.filter-flag-none"> <span class="term"> <strong><code>FILTER_FLAG_NONE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> No flags. </span> </dd> </dt> <dt id="constant.filter-require-scalar"> <span class="term"> <strong><code>FILTER_REQUIRE_SCALAR</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Flag used to require scalar as input </span> </dd> </dt> <dt id="constant.filter-require-array"> <span class="term"> <strong><code>FILTER_REQUIRE_ARRAY</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Require an array as input. </span> </dd> </dt> <dt id="constant.filter-force-array"> <span class="term"> <strong><code>FILTER_FORCE_ARRAY</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Always returns an array. </span> </dd> </dt> <dt id="constant.filter-null-on-failure"> <span class="term"> <strong><code>FILTER_NULL_ON_FAILURE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Use NULL instead of FALSE on failure. </span> </dd> </dt> <dt id="constant.filter-validate-int"> <span class="term"> <strong><code>FILTER_VALIDATE_INT</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "int" filter. </span> </dd> </dt> <dt id="constant.filter-validate-boolean"> <span class="term"> <strong><code>FILTER_VALIDATE_BOOLEAN</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "boolean" filter. </span> </dd> </dt> <dt id="constant.filter-validate-float"> <span class="term"> <strong><code>FILTER_VALIDATE_FLOAT</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "float" filter. </span> </dd> </dt> <dt id="constant.filter-validate-regexp"> <span class="term"> <strong><code>FILTER_VALIDATE_REGEXP</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "validate_regexp" filter. </span> </dd> </dt> <dt id="constant.filter-validate-url"> <span class="term"> <strong><code>FILTER_VALIDATE_URL</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "validate_url" filter. </span> </dd> </dt> <dt id="constant.filter-validate-email"> <span class="term"> <strong><code>FILTER_VALIDATE_EMAIL</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "validate_email" filter. </span> </dd> </dt> <dt id="constant.filter-validate-ip"> <span class="term"> <strong><code>FILTER_VALIDATE_IP</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "validate_ip" filter. </span> </dd> </dt> <dt id="constant.filter-default"> <span class="term"> <strong><code>FILTER_DEFAULT</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of default ("string") filter. </span> </dd> </dt> <dt id="constant.filter-unsafe-raw"> <span class="term"> <strong><code>FILTER_UNSAFE_RAW</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "unsafe_raw" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-string"> <span class="term"> <strong><code>FILTER_SANITIZE_STRING</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "string" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-stripped"> <span class="term"> <strong><code>FILTER_SANITIZE_STRIPPED</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "stripped" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-encoded"> <span class="term"> <strong><code>FILTER_SANITIZE_ENCODED</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "encoded" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-special-chars"> <span class="term"> <strong><code>FILTER_SANITIZE_SPECIAL_CHARS</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "special_chars" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-email"> <span class="term"> <strong><code>FILTER_SANITIZE_EMAIL</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "email" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-url"> <span class="term"> <strong><code>FILTER_SANITIZE_URL</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "url" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-number-int"> <span class="term"> <strong><code>FILTER_SANITIZE_NUMBER_INT</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "number_int" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-number-float"> <span class="term"> <strong><code>FILTER_SANITIZE_NUMBER_FLOAT</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "number_float" filter. </span> </dd> </dt> <dt id="constant.filter-sanitize-magic-quotes"> <span class="term"> <strong><code>FILTER_SANITIZE_MAGIC_QUOTES</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "magic_quotes" filter. </span> </dd> </dt> <dt id="constant.filter-callback"> <span class="term"> <strong><code>FILTER_CALLBACK</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> ID of "callback" filter. </span> </dd> </dt> <dt id="constant.filter-flag-allow-octal"> <span class="term"> <strong><code>FILTER_FLAG_ALLOW_OCTAL</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Allow octal notation (<em>0[0-7]+</em>) in "int" filter. </span> </dd> </dt> <dt id="constant.filter-flag-allow-hex"> <span class="term"> <strong><code>FILTER_FLAG_ALLOW_HEX</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Allow hex notation (<em>0x[0-9a-fA-F]+</em>) in "int" filter. </span> </dd> </dt> <dt id="constant.filter-flag-strip-low"> <span class="term"> <strong><code>FILTER_FLAG_STRIP_LOW</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Strip characters with ASCII value less than 32. </span> </dd> </dt> <dt id="constant.filter-flag-strip-high"> <span class="term"> <strong><code>FILTER_FLAG_STRIP_HIGH</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Strip characters with ASCII value greater than 127. </span> </dd> </dt> <dt id="constant.filter-flag-encode-low"> <span class="term"> <strong><code>FILTER_FLAG_ENCODE_LOW</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Encode characters with ASCII value less than 32. </span> </dd> </dt> <dt id="constant.filter-flag-encode-high"> <span class="term"> <strong><code>FILTER_FLAG_ENCODE_HIGH</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Encode characters with ASCII value greater than 127. </span> </dd> </dt> <dt id="constant.filter-flag-encode-amp"> <span class="term"> <strong><code>FILTER_FLAG_ENCODE_AMP</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Encode <em>&</em>. </span> </dd> </dt> <dt id="constant.filter-flag-no-encode-quotes"> <span class="term"> <strong><code>FILTER_FLAG_NO_ENCODE_QUOTES</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Don't encode <em>'</em> and <em>"</em>. </span> </dd> </dt> <dt id="constant.filter-flag-empty-string-null"> <span class="term"> <strong><code>FILTER_FLAG_EMPTY_STRING_NULL</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> (No use for now.) </span> </dd> </dt> <dt id="constant.filter-flag-allow-fraction"> <span class="term"> <strong><code>FILTER_FLAG_ALLOW_FRACTION</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Allow fractional part in "number_float" filter. </span> </dd> </dt> <dt id="constant.filter-flag-allow-thousand"> <span class="term"> <strong><code>FILTER_FLAG_ALLOW_THOUSAND</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Allow thousand separator (<em>,</em>) in "number_float" filter. </span> </dd> </dt> <dt id="constant.filter-flag-allow-scientific"> <span class="term"> <strong><code>FILTER_FLAG_ALLOW_SCIENTIFIC</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Allow scientific notation (<em>e</em>, <em>E</em>) in "number_float" filter. </span> </dd> </dt> <dt id="constant.filter-flag-path-required"> <span class="term"> <strong><code>FILTER_FLAG_PATH_REQUIRED</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Require path in "validate_url" filter. </span> </dd> </dt> <dt id="constant.filter-flag-query-required"> <span class="term"> <strong><code>FILTER_FLAG_QUERY_REQUIRED</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Require query in "validate_url" filter. </span> </dd> </dt> <dt id="constant.filter-flag-ipv4"> <span class="term"> <strong><code>FILTER_FLAG_IPV4</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Allow only IPv4 address in "validate_ip" filter. </span> </dd> </dt> <dt id="constant.filter-flag-ipv6"> <span class="term"> <strong><code>FILTER_FLAG_IPV6</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Allow only IPv6 address in "validate_ip" filter. </span> </dd> </dt> <dt id="constant.filter-flag-no-res-range"> <span class="term"> <strong><code>FILTER_FLAG_NO_RES_RANGE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Deny reserved addresses in "validate_ip" filter. </span> </dd> </dt> <dt id="constant.filter-flag-no-priv-range"> <span class="term"> <strong><code>FILTER_FLAG_NO_PRIV_RANGE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Deny private addresses in "validate_ip" filter. </span> </dd> </dt> </dl> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="filter.filters.flags.html">Filter flags</a></div> <div class="next" style="text-align: right; float: right;"><a href="filter.examples.html">Examples</a></div> <div class="up"><a href="book.filter.html">Filter</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>