Home  >  Article  >  Backend Development  >  php_strip_whitespace() function in PHP

php_strip_whitespace() function in PHP

PHPz
PHPzforward
2023-08-27 10:57:05886browse

php_strip_whitespace() function in PHP

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

Syntax

php_strip_whitespace(file_path)

parameter

  • file_path − The path of file.

return

The php_strip_whitespace() function returns stripped source code on success.

The Chinese translation of

Example

is:

Example

<?php
   /*
      * Demo comment
   */
   echo php_strip_whitespace ("new.php");
?>

The above code removes all comments and whitespace.

The above is the detailed content of php_strip_whitespace() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete