ID:               26703
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Any
 PHP Version:      4.3.4
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

You already reported a bug about this before.


Previous Comments:
------------------------------------------------------------------------

[2003-12-23 03:36:16] [EMAIL PROTECTED]

Description:
------------
There are two issues with highlight_string, highlight_file and `php
-s`:

1. Some characters (like []{}) are highlighted in non-constant strings
(i.e. double quote strings with variables) as a keyword even on places
where they don't have any special purpose.

2. Some characters ([]{} and backslash sequences) are highlighted in
non-constant strings and aren't highlighted in constant strings. It
should be consistent.

Suggested solution: Don't highlight anything as a keyword both in
constant and non-constant strings.

I've already sent a patch for this to [EMAIL PROTECTED]

Reproduce code:
---------------
<?php
highlight_string('<?php "foo[] $a \n"; ?>');
?>


Expected result:
----------------
<code><font color="#000000">
<font color="#0000BB">&lt;?php </font><font color="#DD0000">"foo[] $a
\n"</font><font color="#007700">; </font><font
color="#0000BB">?&gt;</font>
</font>
</code>

Actual result:
--------------
<code><font color="#000000">
<font color="#0000BB">&lt;?php </font><font
color="#DD0000">"foo</font><font color="#007700">[]</font><font
color="#DD0000"> $a </font><font color="#007700">\n</font><font
color="#DD0000">"</font><font color="#007700">; </font><font
color="#0000BB">?&gt;</font>
</font>
</code>


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26703&edit=1

Reply via email to