The 2 first bugs where really bogus, but imho the last one did make sense.

If stripslashes does "Un-quote string quoted with addslashes()", how addslashes would come up with:
> c:\windows\system32
from:
> c:windowssystem32
?

Maybe its to late for a change, now that most people are used to this behavior, but im still not convinced that it was really supposed to be this way (can anyone explain "why"?).

I noticed 3 different thoughts:

a) stripslashes() were meant to strip all slashes
This confused me, probably i misinterpreted...
Wouldnt it be like calling strtr($string, '\\', '')?

b) stripslashes() were meant to strip all slashes but the ones followed by a slash (if any)
This is how it works now
Though it makes (stripslashes(addslashes(string)) == string) true, it doesnt make (addslashes(stripslashes(string)) == string) necessarily true.

c) stripslashes() were meant to strip all slashes added by addslashes
This is what the manual says.

At bug #27848, iliaa gave a "proof why it works" assuming stripslashes will only be called after addslashes.
That would make the third bug bogus, ok, but probably Alexander Valyalkin would be right also, and it wouldnt be a problem to do things his way.

I probably dont know as much as anyone here, this is just what i understood.
If im wrong, can someone explain where and why?


Antony Dovgal wrote:
On Thu, 10 Jun 2004 10:50:09 +0300
"Alexander Valyalkin" <[EMAIL PROTECTED]> wrote:


On Wed, 9 Jun 2004 15:56:10 +0400, Antony Dovgal
<[EMAIL PROTECTED]>  wrote:


If you think it's wrong - prove it.
There are quite detailed reasons why those bugs were considered to
be bogus.

I'm ok if you're going to improve stripslashes() efficiency and/or
to make it just faster, this could be very useful addon. But I doubt
it needs some kind of'fixing', 'cos it works ok ATM, as I know.


Ok, my version of stripslashes() is faster, clearer, works correctly
with  old
tests and solves mentioned bugs. Are you still doubt? Try to compare
the  old
(current) code to new one.


Faster is ok, but you'd better read what Rasmus said.
And again, trying to fix BOGUS bugs you're going wrong way.

---
WBR,
Antony Dovgal aka tony2001
[EMAIL PROTECTED] || [EMAIL PROTECTED]

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to