Example 1. php_strip_whitespace() example
<?php // PHP comment here
/* * Another PHP comment */
echo php_strip_whitespace(__FILE__); // Newlines are considered whitespace, and are removed too: do_nothing(); ?>
|
The above example will output:
<?php
echo php_strip_whitespace(__FILE__); do_nothing(); ?> |
Notice the PHP comments are gone, as are the whitespace and newline
after the first echo statement.