php_strip_whitespace() function in PHP


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.

Updated on: 30-Jul-2019

62 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements