addcslashes(),charlist参数 - 为什么某些字符会被转换?

addcslashes($str, $charlist)

From http://php.net/manual/en/function.addcslashes.php

"If charlist contains characters , etc., they are converted in C-like style, while other non-alphanumeric characters with ASCII codes lower than 32 and higher than 126 converted to octal representation."

1) So this would be \0, \a, \b, \f, , , \t, \v as far as the first part. What does C-like style conversion mean (any url that I could check on the Net), and why does the conversion take place?

2) Why the "other non-alphanumeric characters with ASCII codes lower than 32 and higher than 126" are converted to their octal representation?

If you do:

echo addcslashes("abc
foo\1bar", "
\1")

the output is:

abc
foo\001bar

The purpose is to return the string in the format that C and PHP programmers are likely to write the literal. We usually write rather than \012 for newline, \e rather than \033 for Escape, rather than \015 for carriage return, etc, so that's what's returned. But most other non-printing characters don't have short escape sequences, so they're returned with octal escapes.