PHP function php_strip_whitespace()

Availability in PHP 5.0

Return source with stripped comments and whitespace

Parameters

Parameter Data type Default value Note
$filename string not Path to the PHP file.

Return values

string

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

This function works as described as of PHP 5.0.1. Before this it would only return an empty string. For more information on this bug and its prior behavior, see bug report #29606.

Additional resources

Official documentation for php-strip-whitespace

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.