Index Documentation

ICloseable
in

Provides an interface for releasing unmanaged resources.

If ICloseable is implemented __destruct() should also be added to the class and should call close in it:

public function close(): void { fclose($this->resource); }

public function __destruct() { $this->close(); }

However if close() is only implemented because a parent interface requires it, the __destruct() implementation may be omitted.

Table of Contents

Methods

close()  : void
Free, release or reset unmanaged resources.

Methods

close()

Free, release or reset unmanaged resources.

public close() : void

        
On this page

Search results