spl_object_id

Supported Versions: PHP 7 >= 7.2.0, PHP 8
Return the integer object handle for given object
<?php spl_object_id(object $object): int
<?php         $result = [];



        foreach ($middleware as $value) {

            $key = \is_object($value) ? \spl_object_id($value) : $value;



            if (! isset($seen[$key])) {

                $seen[$key] = true;
<?php         $output = $this->dump($user);



        $objectId = spl_object_id($user);



        $expected = <<<EOF

        {#$objectId
<?php                 if ($zvalRef) {

                    $vals[$k] = &$stub;         // Break hard references to make $queue completely

                    unset($stub);               // independent from the original structure

                    if (\PHP_VERSION_ID >= 70400 ? null !== $vals[$k] = $hardRefs[$zvalRef] ?? null : $v instanceof Stub && isset($hardRefs[spl_object_id($v)])) {

                        if (\PHP_VERSION_ID >= 70400) {

                            $v = $vals[$k];

                        } else {
<?php                         $hardRefs[$zvalRef] = $vals[$k];

                    } else {

                        $refs[$k] = $vals[$k];

                        $h = spl_object_id($refs[$k]);

                        $hardRefs[$h] = &$refs[$k];

                        $values[$h] = $v;

                    }
<?php                                         $gv = &$a[$gk];

                                        $hardRefs[\ReflectionReference::fromArrayElement($a, $gk)->getId()] = &$gv;

                                    } else {

                                        $gv = &$hardRefs[spl_object_id($v)];

                                    }

                                    $gv = $v;

                                }
<?php                         break;



                    case \is_object($v):

                        if (empty($objRefs[$h = spl_object_id($v)])) {

                            $stub = new Stub();

                            $stub->type = Stub::TYPE_OBJECT;

                            $stub->class = \get_class($v);
<?php                                 if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) {

                                    break;

                                }

                                $stub->handle = $h = spl_object_id($stub->value);

                            }

                            $stub->value = null;

                            if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) {