The php_strip_whitespace() function returns source with stripped comments and whitespace.
Syntax
php_strip_whitespace(file_path)
Parameters
file_path − The path of file.
Return
The php_strip_whitespace() function returns stripped source code on success.
Example
<?php /* * Demo comment */ echo php_strip_whitespace ("new.php"); ?>
The above code strip all the comments and whitespace.