ID:               25725
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kjartan at zind dot net
-Status:           Open
+Status:           Verified
-Bug Type:         Strings related
+Bug Type:         Scripting Engine problem
-Operating System: Linux + Windows
+Operating System: *
-PHP Version:      4.3.3
+PHP Version:      4CVS, 5CVS


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

[2003-10-02 07:17:27] kjartan at zind dot net

Description:
------------
Given a string that contains this PHP code:

<?php
$a = 2;
\;
$b = 3;
?>

Then highlight_string() generates this:

<?php
$a = 2;

Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in
/home/kjartan/scripts/highlight_string on line 9
;
$b = 3;
?>

Granted its not valid PHP, but should hightlight_string() function as a
PHP validation system? Not that it does a good job at it as this gets
colored just fine:

<?php
$a = 2
$b = 3
$c = 5
?>

What gives?

Reproduce code:
---------------
<?php
$string = '<?php
$a = 2;
\
$c = 5;
?>';

highlight_string($string);


Expected result:
----------------
I expect it to just leave the \ alone and not cause warnings.



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


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

Reply via email to