Description Edit

addcslashes returns a string with backslashes before characters that are listed in charlist parameter. If charlist contains characters like '\n', '\r' etc., they are converted C-like. Other non-alphanumeric charecters, with ASCII codes lower than 32 and higher than 126, are converted to their octal representation.

Note: Be careful with the characters 0, a, b, f, n, r, t and v. They get converted to '\0', '\a' etc. which are predefined escape sequences. This way you could get unwanted and unexpected returns.

Parameters Edit

{{{returns}}} addcslashes (string input, string charlist)

Parameter Infos Edit

Parameter PHP Version Type
addcslashes 4 or 5 returns string
input 4 or 5 string
charlist 4 or 5 string

For more details on this function, visit its entry in the php manual.