ID: 26629 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Bogus +Status: Open Bug Type: Strings related PHP Version: 4.3.4 New Comment:
So the newline character should be highlighted as a string and not as a keyword. If you will not fix this, change the state to Wont fix and not to Bogus. Previous Comments: ------------------------------------------------------------------------ [2003-12-17 04:31:47] [EMAIL PROTECTED] Because the lexer in PHP handles those cases different. "$a\n" = quote + variable + newline character + quote "a\n" = string Try this script: <pre> <?php highlight_string('<?php "a\n"; ?>'); var_dump(token_get_all('<?php "a\n"; ?>')); highlight_string('<?php "$a\n"; ?>'); var_dump(token_get_all('<?php "$a\n"; ?>')); ?> </pre> (and leave this bug bogus) ------------------------------------------------------------------------ [2003-12-17 03:51:38] [EMAIL PROTECTED] Tell me a reason why \n should be highlighted as keyword in "$a\n" and in "a\n" not. ------------------------------------------------------------------------ [2003-12-16 17:11:51] [EMAIL PROTECTED] You're wrong. The current behavior is correct. ------------------------------------------------------------------------ [2003-12-16 17:01:57] [EMAIL PROTECTED] I don't know what "1 string" is. Is "$a\n" also "1 string"? If it is, there should not be \n highlighted in it. The problem is that in "$a\n" is \n highlighted and in "a\n" isn't. I believe that it should be consistent. ------------------------------------------------------------------------ [2003-12-16 12:22:20] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This is how it supposed to work, "a\n" is 1 string. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26629 -- Edit this bug report at http://bugs.php.net/?id=26629&edit=1