ID: 31341 Updated by: [EMAIL PROTECTED] Reported By: nmuhayimana at semanticdesigns dot com -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: * PHP Version: 5CVS, 4CVS (2005-08-25) -Assigned To: andi +Assigned To: dmitry New Comment:
Fixed in CVS HEAD and PHP_5_1. Previous Comments: ------------------------------------------------------------------------ [2005-08-03 14:05:11] gopalv82 at yahoo dot com All it needs is just one case '{': in the ST_IN_SCRIPTING state's quoted string handling ?. ------------------------------------------------------------------------ [2005-05-18 12:33:30] [EMAIL PROTECTED] I think there's an omission in ST_IN_SCRIPTING state backshlash handling (around line 1525 of lex file) - unlike ST_DOUBLE_QUOTES state, it does not convert \{ to {. I think they should be brought together, though I'm not sure which one should win - should \{ be left as is or translated to {? ------------------------------------------------------------------------ [2005-02-21 20:42:31] [EMAIL PROTECTED] Andi, is this _really_ intentional? :) ------------------------------------------------------------------------ [2004-12-30 02:57:49] nmuhayimana at semanticdesigns dot com Description: ------------ Php suppresses the backslash before left curly brace using "action at distance", violating the "principle of least surprise". Apparently the backslash is suppressed if there is any non-escaped dollar sign any where in the string. Reproduce code: --------------- <?php echo ("$ \{ \n"); echo (" \{ $\n"); echo (" \{$ \n"); echo (" $\{ \n"); echo (" \$\{ \n"); echo (" \{\$ \n"); echo ("\$ \{ \n"); echo (" \{ \$\n"); echo ("% \{ \n"); ?> Expected result: ---------------- $ \{ \{ $ {$ $\{ $\{ \{$ $ \{ \{ $ % \{ Actual result: -------------- $ { { $ {$ ${ $\{ \{$ $ \{ \{ $ % \{ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31341&edit=1