PHP FILTER_SANITIZE_ENCODED Filter
Complete PHP Filter Reference Manual
Definition and Usage
The FILTER_SANITIZE_ENCODED filter removes or URL-encodes unwanted characters.
This filter is very similar to the urlencode() function.
- Name: "encoded"
- ID-number: 514
Possible flags:
- FILTER_FLAG_STRIP_LOW - Removes characters with ASCII value below 32
- FILTER_FLAG_STRIP_HIGH - Removes characters with ASCII value above 32
- FILTER_FLAG_ENCODE_LOW - Encodes characters with ASCII value below 32
- FILTER_FLAG_ENCODE_HIGH - Encodes characters with ASCII value above 32
Example
The output of the code is shown below:
string(29) "http%3A%2F%2Fwww.runoob.com"
Complete PHP Filter Reference Manual