|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-09 16:02 UTC] crypticcreeper at yahoo dot com
[2005-05-10 00:55 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 02:00:01 2025 UTC |
Description: ------------ When using the /e modifier if the match contains a double quote it is escaped with a \ If it was magic quotes I am assuming it would effect single quotes too, but in fact doesnt. I tested this on Windows 2000 5.0.5-dev and on Linux 5.0.4 and both had same results. Even when I test using a conditional to see if magic quotes is on it still runs it. I even manually set magic quotes off in the script and still the problem occurred. I'm not sure if this is documented behavior, I do know /e causes PHP to escape data, but why only double quotes? Reproduce code: --------------- $data = ' " ' $data = preg_replace('/(")/ie', "'$1'", $data); echo $data; Expected result: ---------------- " Actual result: -------------- \"