PHP pclose() Function

Definition and Usage

The pclose() function closes the pipe opened by popen().

Syntax

pclose(Pipe)
Parameter Description
Pipe Required. Specifies the pipe opened by popen().

Description

The function returns the termination status of the running process.

Returns false if an error occurs.

Example

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