stripcslashes does not simply skip the C-style escape sequences \a, \b, \f, \n, \r, \t and \v, but converts them to their actual meaning.
So
<?php
stripcslashes('\n') == "\n"; //true;
$str = "we are escaping \r\n"; //we are escaping
?>
string
需要反转义的字符串。
返回反转义后的字符串。
示例 #1 stripcslashes() 示例
<?php
var_dump(stripcslashes('I\'d have a coffee.\nNot a problem.') === "I'd have a coffee.
Not a problem."); // true
?>
stripcslashes does not simply skip the C-style escape sequences \a, \b, \f, \n, \r, \t and \v, but converts them to their actual meaning.
So
<?php
stripcslashes('\n') == "\n"; //true;
$str = "we are escaping \r\n"; //we are escaping
?>