#27901 [Fbk->Opn]: highlight_* produces random results

From: Date: Wed, 07 Apr 2004 15:11:42 +0000
Subject: #27901 [Fbk->Opn]: highlight_* produces random results
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-57718@lists.php.net to get a copy of this message
ID: 27901 User updated by: mr dot heat at gmx dot de Reported By: mr dot heat at gmx dot de -Status: Feedback +Status: Open Bug Type: Zend Engine 2 problem Operating System: i686-suse-linux PHP Version: 4.3.5 New Comment: I tried again several minutes ago. First it displayed the wrong result. Then it displayed the right result and I was unable to get the wrong result again. It seems dependent from the time (?). Previous Comments: ------------------------------------------------------------------------ [2004-04-07 08:22:43] derick@php.net I reloaded that site a couple of hundred times, but it always showed the correct result... ------------------------------------------------------------------------ [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

« previous php.bugs (#57718) next »