From: mr dot heat at gmx dot de Operating system: i686-suse-linux PHP version: 4.3.5 PHP Bug Type: Zend Engine 2 problem Bug description: highlight_* produces random results
Description: ------------ highlight_string() produces strange random results (random means, I reload the page and get one of two different results). Sometimes the highlighted string starts in HTML mode (as expected), sometimes it starts in PHP mode (similar to eval()). The effect is, the whole highlighted string becomes blue. In "foo <?php bar(); ?>" for example "foo" becomes blue instead of black. Reproduce code: --------------- <?highlight_string("Text")?> Or check http://phpcenter.de/~thiemo/bug.php and reload the page sometimes. The script running there is: <?=htmlspecialchars(highlight_string("Text", true))?> Expected result: ---------------- <code><font color="#000000"> Text</font> </code> Actual result: -------------- Sometimes: <code><font color="#000000"> Text</font> </code> and sometimes (just reload the page sometimes without any change): <code><font color="#000000"> <font color="#0000BB">Text</font> </font> </code> -- Edit bug report at http://bugs.php.net/?id=27901&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27901&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27901&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27901&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27901&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27901&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27901&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27901&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27901&r=support Expected behavior: http://bugs.php.net/fix.php?id=27901&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27901&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27901&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27901&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27901&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27901&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27901&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27901&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27901&r=float