PHP.nl

pclose

pclose

Closes process file pointer

int **pclose** resource $handle

Closes a file pointer to a pipe opened by . popen

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

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

Voorbeeld: example

<?php
$handle = popen('/bin/ls', 'r');
pclose($handle);
?>

Opmerking: > ### Unix Only:

 is internally implemented using the 
 system call. To obtain the real exit 
status code the  function 
should be used.

pclose``waitpid(3)``pcntl_wexitstatus

popen