get_resource_type

Supported Versions: PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8
Returns the resource type
<?php get_resource_type(resource $resource): string
<?php             case 'resource (closed)':

                $this->type = self::TYPE_RESOURCE;

                $this->handle = (int) $value;

                if ('Unknown' === $this->class = @get_resource_type($value)) {

                    $this->class = 'Closed';

                }

                $this->cut = -1;
<?php                         if (empty($resRefs[$h = (int) $v])) {

                            $stub = new Stub();

                            $stub->type = Stub::TYPE_RESOURCE;

                            if ('Unknown' === $stub->class = @get_resource_type($v)) {

                                $stub->class = 'Closed';

                            }

                            $stub->value = $v;
<?php     private function hasColorSupport($stream): bool

    {

        if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) {

            return false;

        }