参数
string
-
需要反转义的字符串。
返回值
返回反转义后的字符串。
示例
示例 #1 stripcslashes() 示例
<?php
var_dump(stripcslashes('I\'d have a coffee.\nNot a problem.') === "I'd have a coffee.
Not a problem."); // true
?>
+添加备注
用户贡献的备注 1 note
rafayhingoro[at]hotmail[dot]com ¶
8 years ago
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
?>
备份地址:http://www.lvesu.com/blog/php/function.stripcslashes.php