PHP Filter Functions
PHP Filter Introduction
This PHP filters is used to validate and filter data coming from insecure sources,
like user input.
Installation
The filter functions are part of the PHP core. There is no installation needed
to use these functions.
PHP Filter Functions
PHP: indicates the earliest version of PHP that supports the
function.
PHP Filters
| ID Name |
Description |
| FILTER_CALLBACK |
Call a user-defined function to filter data |
| FILTER_SANITIZE_STRING |
Strip tags, optionally strip or encode special characters |
| FILTER_SANITIZE_STRIPPED |
Alias of "string" filter |
| FILTER_SANITIZE_ENCODED |
URL-encode string, optionally strip or encode special
characters |
| FILTER_SANITIZE_SPECIAL_CHARS |
HTML-escape '"<>& and characters with ASCII value less than
32 |
| FILTER_SANITIZE_EMAIL |
Remove all characters, except letters, digits and !#$%&'*+-/=?^_`{|}~@.[] |
| FILTER_SANITIZE_URL |
Remove all characters, except letters, digits and $-_.+!*'(),{}|\\^~[]`<>#%";/?:@&= |
| FILTER_SANITIZE_NUMBER_INT |
Remove all characters, except digits and +- |
| FILTER_SANITIZE_NUMBER_FLOAT |
Remove all characters, except digits, +- and optionally .,eE |
| FILTER_SANITIZE_MAGIC_QUOTES |
Apply addslashes() |
| FILTER_UNSAFE_RAW |
Do nothing, optionally strip or encode special characters |
| FILTER_VALIDATE_INT |
Validate value as integer, optionally from the specified
range |
| FILTER_VALIDATE_BOOLEAN |
Return TRUE for "1", "true", "on" and "yes", FALSE for "0",
"false", "off", "no", and "", NULL otherwise |
| FILTER_VALIDATE_FLOAT |
Validate value as float |
| FILTER_VALIDATE_REGEXP |
Validate value against regexp, a Perl-compatible regular
expression |
| FILTER_VALIDATE_URL |
Validate value as URL, optionally with required components |
| FILTER_VALIDATE_EMAIL |
Validate value as e-mail |
| FILTER_VALIDATE_IP |
Validate value as IP address, optionally only IPv4 or IPv6
or not from private or reserved ranges |
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a free 30-day trial today!
Click to see a demo!
Learn what’s new in v2008
 |
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
|
|