Uh, what are you guys talking about? That test case is bogus.
$s = 'c:\\windows\\system32';
This means that the base string we are working with is c:\windows\system32
here before any sort of stripslashes. If you then call stripslashes() on
that, it will strip these slashes! That's exactly what the function is
designed to do and what it is supposed to do. If your version does not
strip these slashes, then it is not stripslashes(). stripslashes() strips
all slashes, not just slashes before ', " and \ very much by design.
I suppose it might be useful to have a version of stripslashes() which only strips slashes if they come before ', " or \ but this function wouldn't be stripslashes() and certainly shouldn't replace the existing stripslashes function because doing so would break all sorts of stuff.
-Rasmus
I think it will be very useful to add optional parameter to stripslashes()
to strip only slashes which have been added by addslashes() (before ", ', \ and NULL).
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php