PHP pclose() Function
In this chapter you will learn:
- Definition for PHP pclose() Function
- Syntax for PHP pclose() Function
- Parameter for PHP pclose() Function
- Return for PHP pclose() Function
- Example - Close a pipe opened by popen()
Definition
The pclose() function closes a pipe opened by popen().
Syntax
PHP pclose() Function has the following syntax.
pclose(pipe)
Parameter
Parameter | Is Required | Description |
---|---|---|
pipe | Required. | Pipe opened by popen() |
Return
This function returns FALSE on failure.
Example
Close a pipe opened by popen()
<?php// j a va2 s. c om
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
Next chapter...
What you will learn in the next chapter:
- Definition for PHP popen() Function
- Syntax for PHP popen() Function
- Parameter for PHP popen() Function
- Return for PHP popen() Function
- Example - Opens a pipe to the program specified in the command parameter
Home » PHP Tutorial » PHP File Functions