PHP pclose() Function

P
PHP popen() Function
PHP pathinfo() Function

In this article, you will learn how to close an opened pipe in PHP. The pclose() function in PHP closes a pipe. The pipe in PHP is open by the open() function.

what is the syntax of the PCLOSE function in php?

pclose(pipe)
ParameterDescription
pipeRequired. Specifies the pipe opened by popen()
PHP pclose() method

examples of the PCLOSE function

Example 1. In this example, we open and close a pipe to the program specified in the command parameter.

<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
PHP popen() Function
PHP pathinfo() Function

Add comment

Tutor Network

Share this

Learn PHP from A to Z