Change language

PHP Php_strip_whitespace () function

|
Syntax:
string php_strip_whitespace ($file)
Parameters:php_strip_whitespace function() takes one parameter $file. This is a required parameter and specifies the file.Returned value:Returns the original $file after removing comments and spaces on success, otherwise returns an empty string.Exceptions :
  • It works on PHP 5.0.1 and later, it returns an empty string in previous versions.
  • This function works similarly to the php -wcommand line.
The following programs illustrate the php_strip_whitespace() function in PHP:
Program:
// Simple program for remove comments
// using the php_strip_whitespace function. 
// function for calculating the number Fibonacci function fib ( $n ) { if ( $n < = 1) return $n ; return fib ( $n - 1) + fib ( $n - 2); }  
// Driver code $n = 9; fib ( $n );  
/ *
* Another multi-line comment
* / echo php_strip_whitespace ( __ FILE__ );  
// This line is also removed
?>
Exit:
Link: http: //php.net/manual/en/function.php-strip-whitespace.php

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method