From: php at glaciersoftware dot com Operating system: Linux 2.4.20-18.8 RedHat 8.0 PHP version: 4.3.1 PHP Bug Type: Scripting Engine problem Bug description: PHP scripting engine seems to replacing the word "status" with "foo1"
Description: ------------ For some unknown reason, the PHP scripting engine seems to replacing the word "status" with "foo1" when an equal-sign, 0x3d, appears within 6 characters of the word "status". Bug was reported on http://bugs.php.net as Bug #21851, but status was changed to CLOSED after someone was not able to duplicate the problem. Tested Environment ================== The following webservers were used to test the below code for the existance of this problem: * PHP 4.2.1 with Apache/1.3.24 running on Linux 2.4.18-3 RedHat 7.3 * PHP 4.3.1 with Apache/2.0.43 running on Linux 2.4.20-18.8 RedHat 8.0 Code ==== The following code should replicate the problem. The "<br>\n" appended to the echo() call is used only for readability, the problem will still exist without this string added. << See Reproduce Code >> Reproduce code: --------------- <?php // *** Note the 6 spaces, 0x20, between the word status and the equal-sign // *** the word "status" will be replaced with "foo1" $buf = "foo1 = 'C' "; echo($buf . "<br>\n"); // *** The number of spaces has been changed from 6 to 7 // *** now it doesn't replace "status" with "foo1" $buf = "status = 'C' "; echo($buf . "<br>\n"); ?> Expected result: ---------------- status = 'C' <br> status = 'C' <br> Actual result: -------------- foo1 = 'C' <br> status = 'C' <br> -- Edit bug report at http://bugs.php.net/?id=24351&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24351&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24351&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24351&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24351&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24351&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24351&r=support Expected behavior: http://bugs.php.net/fix.php?id=24351&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24351&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24351&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24351&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24351&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24351&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24351&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24351&r=gnused