highlight_string() annoyance

Feaky PHP experience.

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 highlight_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? Bug or feature? I wonder.

Comments

eKvOIP

eKvOIP xf78fg623fv0skghlq56fd