Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Closes an open file pointer
<?php fclose(resource $stream): bool
<?php             if ($returnDump) {

                $result = stream_get_contents($output, -1, 0);

                fclose($output);



                return $result;

            }
<?php             }

            if (!$socketIsFresh) {

                stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR);

                fclose($this->socket);

                $this->socket = $this->createSocket();

            }

            if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) {
<?php                     $sockets[(int) $stream] = $stream;

                } elseif (feof($stream)) {

                    unset($sockets[(int) $stream]);

                    fclose($stream);

                } else {

                    yield (int) $stream => fgets($stream);

                }
<?php     public function testClosedResource()

    {

        $var = fopen(__FILE__, 'r');

        fclose($var);



        $dumper = new CliDumper('php://output');

        $dumper->setColors(false);