> the problem is also for 'regular' magic mode. > the addslashes add slashes anly when the slash follow by '\'' or '\"' or > '\\' but on stripslashes it's nuke all the slashes without considering whats > came after that.
well, since magic mode could be corrupted if we handy playing with the string, e.g. adding slash into string, i wrong here. the only problem was the reported bug thats now fixed on the cvs. this fix also addslashes no matter sybase or not but still exist delte between sybase and regular mode regrading the way quotes are manipulating. regrading the WTF factor, sincs add\strip slash function main, if not only, target is database related, caution on the documentation is enough. otherwise, u may want complatly fork php_*_slashes into php_*_magic, thats olso contains the check if magic mode set on.