<?php declare(strict_types = 1); class Test { private \finfo $finfo; public function __construct() { $finfo = finfo_open(); if ($finfo === false) { throw new \RuntimeException(); } $this->finfo = $finfo; var_dump('opened'); } public function close(): void { finfo_close($this->finfo); var_dump('closed'); } } $t = new Test(); $t->close();
You have javascript disabled. You will not be able to edit any code.