#46398 [Opn->Bgs]: highlight_string() removes backslashes
| From: | scottmac@php.net | Date: | Mon, 27 Oct 2008 07:08:49 +0000 |
| Subject: | #46398 [Opn->Bgs]: highlight_string() removes backslashes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-130174@lists.php.net to get a copy of this message | ||
ID: 46398
Updated by: scottmac@php.net
Reported By: fromphp dot nethash69 at vano dot org
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows XP Pro
PHP Version: 5.2.6
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
// is a comment not \\ which is an escape character.
Previous Comments:
------------------------------------------------------------------------
[2008-10-27 00:32:47] fromphp dot nethash69 at vano dot org
Description:
------------
function highlight_string() removes backslashes
Reproduce code:
---------------
<?php
$text = '<?php
$blah = 1;
\\this is a comment line with two backslashes at the beginning and one
at the end:\
$blah = 2;
?>';
highlight_string($text);
?>
Expected result:
----------------
Expected output in the browser:
<?php
$blah = 1;
\\this is a comment line with two backslashes at the beginning and one
at the end:\
$blah = 2;
?>
Actual result:
--------------
Actual output in the browser:
<?php
$blah = 1;
this is a comment line with two backslashes at the beginning and one at
the end:
$blah = 2;
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46398&edit=1