Stripcslashes behaviour
| From: | Stanislav Malyshev | Date: | Fri, 09 Jun 2000 11:52:26 +0000 |
| Subject: | Stripcslashes behaviour | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-20712@lists.php.net to get a copy of this message | ||
I've noticed that stripcslashes has behaviour that is incompatible both
with addcslashes and with C behaviour. As follows: if stripcslashes meets
unknown escape (like \" or \<any character except known>) it leaves it as
is, while C ignores the slash (strips it). This behaviour is incompatible
with addcslashes - try:
<? var_dump(stripcslashes(addcslashes("@!#","@!#"))); ?>
and ther result would be with slashes, though semantically it should be
"@!#".
Was this incompatibility introduced by some reason or this is just a bug?
--
Stanislav Malyshev stas@zend.com
+972-3-6139665