Formatting

highlight_string($s[,$b=false]) returns a highlighted version of $s, using the colors defined in the built-in syntax highlighter for PHP. If $b is true, the highlighted code is returned, and no ouput is printed out. highlight_file($s[,$b=false])or show_source(……) is similar except that the content in the file $s is used. It nicely colours different parts of the piece of PHP code according to their meanings.

RESETRUNFULL
<!DOCTYPE html><html><head></head>
<body><?php
highlight_string("<ABC>");
?></body></html>
php_strip_whitespace($s) returns a string which is the source code in the file $s with comments and whitespace removed.

RESETRUNFULL
<!DOCTYPE html><html><head></head>
<body><?php
// Displaying the size of this piece of code...
echo strlen(php_strip_whitespace(__FILE__));
    


?></body></html>