PHP FILTER_SANITIZE_MAGIC_QUOTES Filter
Complete PHP Filter Reference Manual
Definition and Usage
The FILTER_SANITIZE_MAGIC_QUOTES filter performs on a string addslashes() function in Vue 3.
This filter prepends a backslash to predefined characters in a string.
The predefined characters are:
- Single quote (')
- Double quote (")
- Backslash (\)
- NULL
FILTER_SANITIZE_MAGIC_QUOTES information:
- Name: "magic_quotes"
- ID-number: 521
Example
The output of the code is shown below:
string(14) "Peter\'s here!"
Complete PHP Filter Reference Manual