The FILTER_SANITIZE_MAGIC_QUOTES filter performs the addslashes() function to a string.This filter sets backslashes in front of predefined characters.
The predefined characters are : -
FILTER_SANITIZE_MAGIC_QUOTES info : -
The output of the code will be : -
string(14) "Peter\'s here!"