HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

pclose

Description

The pclose of Filesystem for PHP closes the process file pointer.

Syntax

pclose(
    resource $handle
): int

Parameters

handle

The file pointer must be valid, and must have been returned by a successful call to popen().

Return

Returns the termination status of the process that was run. In case of an error then -1 is returned.

NOTE: If PHP has been compiled with --enable-sigchild, the return value of this function is undefined.

Examples

1 · handle

<?

$command = "/bin/ls";
$mode = "r";

$handle = popen($command, $mode);

pclose($handle);