private function close($resource)
    {
        if (is_resource($resource)) {
            fclose($resource);
        }

        if (is_resource($this->process)) {
            proc_close($this->process);
            $this->process = null;
        }

        $this->stdin->close();
    }
private function close($resource)
    {
        if (is_resource($resource)) {
            fclose($resource);
        }

        if (is_resource($this->process)) {
            proc_close($this->process);
            $this->process = null;
        }

        $this->stdin->close();
    }
private function close ( $ resource ) { if ( is_resource ( $ resource ) ) { fclose ( $ resource ) ; } if ( is_resource ( $ this -> process ) ) { proc_close ( $ this -> process ) ; $ this -> process = null ; } $ this -> stdin -> close ( ) ; }
Closes the stream resource provided, the open process handle, and stdin.

@param resource $resource
Closes the stream resource provided the open process handle and stdin .