get_parent_class

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Retrieves the parent class name for object or class
<?php get_parent_class(object|string $object_or_class = ?): string|false
<?php             return $resolver;

        }



        if ($parent = get_parent_class($class)) {

            return $this->relationResolver($parent, $key);

        }
<?php });



it('uses correct parent class', function () {

    expect(get_parent_class($this))->toEqual(InheritanceTest::class);

    expect($this->foo())->toEqual('bar');

})->depends('it is a test');
<?php             if (str_contains($identifier, "@anonymous\0")) {

                $this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {

                    return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];

                }, $identifier);

            }
<?php         if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) {

            $a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {

                return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];

            }, $a[Caster::PREFIX_PROTECTED.'message']);

        }
<?php {

    public static function castProxy(ProxyInterface $c, array $a, Stub $stub, bool $isNested)

    {

        if ($parent = get_parent_class($c)) {

            $stub->class .= ' - '.$parent;

        }

        $stub->class .= '@proxy';