Menu Home

stripcslashes

osbo.com | PHP | Functions | stripcslashes

Un-quote string quoted with addcslashes()

Syntax

stripcslashes ( string $str ) : string

Parameters

str

The string to be unescaped.

Return

Returns the unescaped string.

Examples

1

<?

$addcslashesstr = 'ABCDEabcde';
$addcslashescharlist = 'C..Ec..e';

$addcslashesreturn = addcslashes($addcslashesstr, $addcslashescharlist);

echo $addcslashesreturn . PHP_EOL;

$str = $addcslashesreturn;

$return = stripcslashes($str);

echo $return;

?>
AB\C\D\Eab\c\d\e
ABCDEabcde

2

<?

$addcslashesstr = "ABCDEabcde";
$addcslashescharlist = "\103..\105\143..\145";

$addcslashesreturn = addcslashes($addcslashesstr, $addcslashescharlist);

echo $addcslashesreturn . PHP_EOL;

$str = $addcslashesreturn;

$return = stripcslashes($str);

echo $return;

?>
AB\C\D\Eab\c\d\e
ABCDEabcde

PHP