Easy Tutorial
❮ Func Math Asinh Func Mysqli Fetch Fields ❯

PHP php_strip_whitespace() Function

PHP Misc Reference Manual

Example

Returns the source code of the "test.php" file with PHP comments and whitespace characters removed:

<?php// PHP comment
/*
*  Another PHP comment
*/
echo php_strip_whitespace("test.php");
?>

If you choose "View Source" in the browser window, it will look like this:

<?php
echo php_strip_whitespace ("test.php"); ?>

Definition and Usage

The php_strip_whitespace() function returns the source code with PHP comments and whitespace characters removed.


Syntax

Parameter Description
filename Required. Specifies the file name.

Technical Details

Return Value: Returns the source code with PHP comments and whitespace characters removed if successful, or an empty string if failed. Note: Prior to PHP 5.0.1, this function only returned an empty string.
PHP Version: 5+
--- ---

❮ Func Math Asinh Func Mysqli Fetch Fields ❯