On Wed, 2002-02-20 at 14:13, Rein Velt wrote: > At this moment (php4.1.1) the function "highlight_string" has the following > syntax: > > > [quote] > bool highlight_string ( string str) > This function prints out a syntax highlighted version of str using the > colors defined in the built-in syntax highlighter for PHP. Returns TRUE or > FALSE. > [/quote] > > > > The function will be more flexible if it returns a string (with highlights) > and nothing is printed directly.
The Bugs Database is the place for feature requests: http://bugs.php.net. But read the instructions first. :) Anyway, as noted in the docs, you can do this yourself: <?php error_reporting(E_ALL); function my_highlight_string($string) { ob_start(); highlight_string($string); $retval = ob_get_contents(); ob_end_clean(); return $retval; } $str = my_highlight_string('<?php error_reporting(E_ALL); function my_highlight_string($string) { ob_start(); highlight_string($string); $retval = ob_get_contents(); ob_end_clean(); return $retval; } ?>'); echo "The highlighted string: $str"; ?> Cheers, Torben > str highlight_string ( string str) > This function returns a string containing a syntax highted version of str > using the colors defined in the built-in syntax highlighter for PHP. Returns > TRUE or FALSE. > > Reference: http://lxr.php.net/source/ZendEngine2/zend_highlight.c#84 > > > > -- > Rein Velt web application engineering > mailto:[EMAIL PROTECTED] > http://velt.net -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php