<?
$text ="

Um script:

<?
echo 'Romano';
?>

Outro script:

<?
phpinfo();

?>

Que tal outro :
<html>
<?
session_start();
\$_SESSION['cont']++;
echo \$_SESSION['cont'];
?>
asddasdasd:
<?
echo '$teste';
?>

</html>

";

$text = preg_replace("/(.?)(<html>.?<\?.*?\?>.?<\/html>|<\?.*?\?>)(.?)/imse","'\\1<br/>'.highlight_string('\\2', TRUE).'<br/>\\3'",$text);
echo $text; 


?>