ID: 27901 Updated by: [EMAIL PROTECTED] Reported By: mr dot heat at gmx dot de -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: i686-suse-linux PHP Version: 4.3.5 New Comment:
I reloaded that site a couple of hundred times, but it always showed the correct result... Previous Comments: ------------------------------------------------------------------------ [2004-04-07 06:05:27] mr dot heat at gmx dot de 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 this bug report at http://bugs.php.net/?id=27901&edit=1