string addcslashes ( string $str , string $charlist )
Returns a string with backslashes before characters that are listed in charlist parameter.
charlist
1) \n and \r are converted to C-style
2) 0-32 and higher than 126 converted to octal
3) A..z the range is correct, A to Z, a to z and period will be escaped
4) z..A the range is incorrect, only z,A and period(.) will be escaped
5) "\0..\37", which would escape all characters with ASCII code between 0 and 31.
echo addcslashes('foo[ ]', 'A..z'); // \f\o\o\[ \]
echo addcslashes("zoo['.']", 'z..A'); // \zoo['\.']
Returns a string with backslashes before characters that are listed in charlist parameter.
charlist
1) \n and \r are converted to C-style
2) 0-32 and higher than 126 converted to octal
3) A..z the range is correct, A to Z, a to z and period will be escaped
4) z..A the range is incorrect, only z,A and period(.) will be escaped
5) "\0..\37", which would escape all characters with ASCII code between 0 and 31.
echo addcslashes('foo[ ]', 'A..z'); // \f\o\o\[ \]
echo addcslashes("zoo['.']", 'z..A'); // \zoo['\.']
No comments:
Post a Comment