Re: Stripcslashes behaviour
| From: | Andrei Zmievski | Date: | Fri, 09 Jun 2000 13:30:38 +0000 |
| Subject: | Re: Stripcslashes behaviour | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-20734@lists.php.net to get a copy of this message | ||
On Fri, 09 Jun 2000, Stanislav Malyshev wrote:
> 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?
Not sure, but I think you're right in that it should remove the slashes
from unknown escapes. If no one objects, I will fix it.
-Andrei
* "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis *