Predefined Constants

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.

INPUT_POST (int)
POST variables.
INPUT_GET (int)
GET variables.
COOKIE variables.
INPUT_ENV (int)
ENV variables.
INPUT_SERVER (int)
SERVER variables.
INPUT_SESSION (int)
SESSION variables. (not implemented yet)
INPUT_REQUEST (int)
REQUEST variables. (not implemented yet)
FILTER_FLAG_NONE (int)
No flags.
FILTER_REQUIRE_SCALAR (int)
Flag used to require scalar as input
FILTER_REQUIRE_ARRAY (int)
Require an array as input.
FILTER_FORCE_ARRAY (int)
Always returns an array.
FILTER_NULL_ON_FAILURE (int)
Use NULL instead of FALSE on failure.
FILTER_VALIDATE_INT (int)
ID of "int" filter.
FILTER_VALIDATE_BOOL (int)
Alias of FILTER_VALIDATE_BOOLEAN.
FILTER_VALIDATE_BOOLEAN (int)
ID of "boolean" filter.
FILTER_VALIDATE_FLOAT (int)
ID of "float" filter.
FILTER_VALIDATE_REGEXP (int)
ID of "validate_regexp" filter.
FILTER_VALIDATE_URL (int)
ID of "validate_url" filter.
FILTER_VALIDATE_DOMAIN (int)
ID of "validate_domain" filter. (Available as of PHP 7.0.0)
FILTER_VALIDATE_EMAIL (int)
ID of "validate_email" filter.
FILTER_VALIDATE_IP (int)
ID of "validate_ip" filter.
FILTER_VALIDATE_MAC (int)
ID of "validate_mac_address" filter.
FILTER_DEFAULT (int)
ID of default ("unsafe_raw") filter. This is equivalent to FILTER_UNSAFE_RAW.
FILTER_UNSAFE_RAW (int)
ID of "unsafe_raw" filter.
FILTER_SANITIZE_STRING (int)
ID of "string" filter. (Deprecated as of PHP 8.1.0, use htmlspecialchars() instead.)
FILTER_SANITIZE_STRIPPED (int)
ID of "stripped" filter. (Deprecated as of PHP 8.1.0, use htmlspecialchars() instead.)
FILTER_SANITIZE_ENCODED (int)
ID of "encoded" filter.
FILTER_SANITIZE_SPECIAL_CHARS (int)
ID of "special_chars" filter.
FILTER_SANITIZE_EMAIL (int)
ID of "email" filter.
FILTER_SANITIZE_URL (int)
ID of "url" filter.
FILTER_SANITIZE_NUMBER_INT (int)
ID of "number_int" filter.
FILTER_SANITIZE_NUMBER_FLOAT (int)
ID of "number_float" filter.
FILTER_SANITIZE_MAGIC_QUOTES (int)
ID of "magic_quotes" filter. (DEPRECATED as of PHP 7.3.0 and REMOVED as of PHP 8.0.0, use FILTER_SANITIZE_ADD_SLASHES instead.)
FILTER_SANITIZE_ADD_SLASHES (int)
ID of "add_slashes" filter. (Available as of PHP 7.3.0)
FILTER_CALLBACK (int)
ID of "callback" filter.
FILTER_FLAG_ALLOW_OCTAL (int)
Allow octal notation (0[0-7]+) in "int" filter.
FILTER_FLAG_ALLOW_HEX (int)
Allow hex notation (0x[0-9a-fA-F]+) in "int" filter.
FILTER_FLAG_STRIP_LOW (int)
Strip characters with ASCII value less than 32.
FILTER_FLAG_STRIP_HIGH (int)
Strip characters with ASCII value greater than 127.
FILTER_FLAG_STRIP_BACKTICK (int)
Strips backtick characters.
FILTER_FLAG_ENCODE_LOW (int)
Encode characters with ASCII value less than 32.
FILTER_FLAG_ENCODE_HIGH (int)
Encode characters with ASCII value greater than 127.
FILTER_FLAG_ENCODE_AMP (int)
Encode &.
FILTER_FLAG_NO_ENCODE_QUOTES (int)
Don't encode ' and ".
FILTER_FLAG_EMPTY_STRING_NULL (int)
(No use for now.)
FILTER_FLAG_ALLOW_FRACTION (int)
Allow fractional part in "number_float" filter.
FILTER_FLAG_ALLOW_THOUSAND (int)
Allow thousand separator (,) in "number_float" filter.
FILTER_FLAG_ALLOW_SCIENTIFIC (int)
Allow scientific notation (e, E) in "number_float" filter.
FILTER_FLAG_PATH_REQUIRED (int)
Require path in "validate_url" filter.
FILTER_FLAG_QUERY_REQUIRED (int)
Require query in "validate_url" filter.
FILTER_FLAG_SCHEME_REQUIRED (int)
Require scheme in "validate_url" filter. (Deprecated as of PHP 7.3.0 and removed as of PHP 8.0.0, as it is implied in the filter already.)
FILTER_FLAG_HOST_REQUIRED (int)
Require host in "validate_url" filter. (Deprecated as of PHP 7.3.0 and removed as of PHP 8.0.0, as it is implied in the filter already.)
FILTER_FLAG_HOSTNAME (int)
Require hostnames to start with an alphanumeric character and contain only alphanumerics or hyphens. (Available as of PHP 7.0.0)
FILTER_FLAG_IPV4 (int)
Allow only IPv4 address in "validate_ip" filter.
FILTER_FLAG_IPV6 (int)
Allow only IPv6 address in "validate_ip" filter.
FILTER_FLAG_NO_RES_RANGE (int)
Deny reserved addresses in "validate_ip" filter.
FILTER_FLAG_NO_PRIV_RANGE (int)
Deny private addresses in "validate_ip" filter.
FILTER_FLAG_EMAIL_UNICODE (int)
Accepts Unicode characters in the local part in "validate_email" filter. (Available as of PHP 7.1.0)

Here you can write a comment


Please enter at least 10 characters.
Loading... Please wait.
* Pflichtangabe
There are no comments available yet.

PHP cURL Tutorial: Using cURL to Make HTTP Requests

cURL is a powerful PHP extension that allows you to communicate with different servers using various protocols, including HTTP, HTTPS, FTP, and more. ...

TheMax

Autor : TheMax
Category: PHP-Tutorials

Midjourney Tutorial - Instructions for beginners

There is an informative video about Midjourney, the tool for creating digital images using artificial intelligence, entitled "Midjourney tutorial in German - instructions for beginners" ...

Mike94

Autor : Mike94
Category: KI Tutorials

Basics of views in MySQL

Views in a MySQL database offer the option of creating a virtual table based on the result of an SQL query. This virtual table can be queried like a normal table without changing the underlying data. ...

admin

Autor : admin
Category: mySQL-Tutorials

Publish a tutorial

Share your knowledge with other developers worldwide

Share your knowledge with other developers worldwide

You are a professional in your field and want to share your knowledge, then sign up now and share it with our PHP community

learn more

Publish a tutorial