ID: 26629
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Strings related
PHP Version: 4.3.4
New Comment:
The current behavior is CORRECT, so your report is BOGUS. highlight_*
uses the lexical analyer to highlight and this is the perfectly good
behavior as I told you atleast 5 times now. Please keep the status to
bogus.
Previous Comments:
------------------------------------------------------------------------
[2003-12-19 06:15:06] [EMAIL PROTECTED]
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.
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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