Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

php_strip_whitespace

Description

The php_strip_whitespace of Miscellaneous for PHP return source with stripped comments and whitespace.

Syntax

php_strip_whitespace ( string $filename ) : string

Parameters

filename

Path to the PHP file.

Return

The stripped source code will be returned on success, or an empty string on failure.

Note: This function respects the value of the short_open_tag ini directive.

Examples

1

<?

// PHP comment

/*
 * Another PHP comment
 */

// newlines are considered whitespace




echo        php_strip_whitespace(__FILE__);

?>
<? echo php_strip_whitespace(__FILE__); ?>
HomeMenu