#26629 [Opn->Bgs]: Inconsistent handle of \n in highlight_string and highlight_file
| From: | iliaa@php.net | Date: | Tue, 16 Dec 2003 17:22:20 +0000 |
| Subject: | #26629 [Opn->Bgs]: Inconsistent handle of \n in highlight_string and highlight_file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52177@lists.php.net to get a copy of this message | ||
ID: 26629
Updated by: iliaa@php.net
Reported By: vrana@php.net
-Status: Open
+Status: Bogus
Bug Type: Strings related
PHP Version: 4.3.4
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2003-12-16 12:08:14] vrana@php.net
Sorry for mismatch. The bug report is for PHP 4. I looked for
highlighting code and I found it in /ZendEngine2 but I didn't realized
that this code is for PHP 5 only. I don't know where this part of code
for PHP 4 is. Just ignore the sentence in bracket, the provided version
information is correct.
------------------------------------------------------------------------
[2003-12-15 09:09:46] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
And is this with PHP 5 or 4 ??? You're referring to ZendEngine 2 but
the version in this report is 4.3.3 ????
(I would expect that people who have @php.net address should know HOW
to report bugs..)
------------------------------------------------------------------------
[2003-12-15 05:57:24] vrana@php.net
Description:
------------
highlight.keyword isn't used in strings without variables for \n and
similar. It is used in strings with variables (e.g. "$a\n").
(The problem is in file /ZendEngine2/zend_highlight.c.)
Reproduce code:
---------------
highlight_string('<?php echo "a\n"; ?>');
Expected result:
----------------
<code><font color="#000000">
<font color="#0000BB"><?php </font><font
color="#007700">echo
</font><font color="#DD0000">"a</font><font
color="#007700">\n</font><font
color="#DD0000">"</font><font
color="#007700">; </font><font
color="#0000BB">?></font>
</font>
</code>
Actual result:
--------------
<code><font color="#000000">
<font color="#0000BB"><?php </font><font
color="#007700">echo
</font><font color="#DD0000">"a\n"</font><font
color="#007700">;
</font><font color="#0000BB">?></font>
</font>
</code>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26629&edit=1