note 9683 added to AddCSlashes
| From: | zak@php.net | Date: | Sun, 19 Nov 2000 04:02:52 +0000 |
| Subject: | note 9683 added to AddCSlashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7876@lists.php.net to get a copy of this message | ||
When you define a sequence of characters in the charlist argument make sure that you know what
characters come between the characters that you set as the start and end of the range.
For example
print addcslashes ('foo[]', 'A..z');
// All upper and lower-case letters will be escaped
// ..but so will the [\]^_` and space characters.
Also, if the first character in a range has a lower ASCII value than the second character in the
range, no range will be constructed. Only the start, end and period characters will be escaped.
For example:
print addcslashes ("foo['.']", 'z..A');
http://www.php.net/manual/de/function.addcslashes.php