Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get the type of a variable
<?php gettype(mixed $value): string
<?php     {

        $this->value = $value;



        switch (\gettype($value)) {

            case 'object':

                $this->type = self::TYPE_OBJECT;

                $this->class = \get_class($value);
<?php             $item = $item->value;

        }

        if (!$item instanceof Stub) {

            return \gettype($item);

        }

        if (Stub::TYPE_STRING === $item->type) {

            return 'string';
<?php         if (!$item instanceof Stub) {

            $cursor->attr = [];

            $type = \gettype($item);

            if ($item && 'array' === $type) {

                $item = $this->getStub($item);

            }
<?php                 $cursor->hardRefCount = 0 < $item->handle ? $item->refCount : 0;

            }

            $cursor->attr = $item->attr;

            $type = $item->class ?: \gettype($item->value);

            $item = $this->getStub($item->value);

        }

        if ($item instanceof Stub) {
<?php         foreach ($data as $k => $v) {

            $this->assertTrue(isset($data->{$k}));

            $this->assertTrue(isset($data[$k]));

            $this->assertSame(\gettype($values[$k]), $data->seek($k)->getType());

            $this->assertSame($values[$k], $data->seek($k)->getValue());

            $this->assertSame($values[$k], $data->{$k});

            $this->assertSame($values[$k], $data[$k]);