Friday, April 4, 2014

Escape sequences PHP



(PHP 4, PHP 5)
addslashesQuote string with slashes

stripcslashes() - Un-quote string quoted with addcslashes
stripslashes() - Un-quotes a quoted string
addcslashes() - Quote string with slashes in a C style
htmlspecialchars() - Convert special characters to HTML entities
quotemeta() - Quote meta characters
get_magic_quotes_gpc() - Gets the current configuration setting of magic_quotes_gpc




Escape sequences

The backslash character has several uses. Firstly, if it is followed by a non-alphanumeric character, it takes away any special meaning that character may have. This use of backslash as an escape character applies both inside and outside character classes.

No comments:

Post a Comment