Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP FILTER_SANITIZE_URL Filter

PHP FILTER_SANITIZE_URL Filter


PHP Filter Reference Manual Complete PHP Filter Reference Manual


Definition and Usage

The FILTER_SANITIZE_URL filter removes all illegal URL characters from a string.

This filter allows all letters, digits, and $-_.+!*'(),{}|^~[]`"><#%;/?:@&=


Example

The output of the code is shown below:

string(24) "http://www.w3cschool.cc"


PHP Filter Reference Complete PHP Filter Reference Manual