Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns the name of the class of an object
<?php get_class(object $object = ?): string
<?php         }



        if (is_array($class)) {

            $className = is_string($class[0]) ? $class[0] : get_class($class[0]);



            return $this->methodAllowsGuests($className, $class[1]);

        }
<?php     public function getPolicyFor($class)

    {

        if (is_object($class)) {

            $class = get_class($class);

        }



        if (! is_string($class)) {
<?php     public function handle(BroadcastingFactory $manager)

    {

        $name = method_exists($this->event, 'broadcastAs')

                ? $this->event->broadcastAs() : get_class($this->event);



        $channels = Arr::wrap($this->event->broadcastOn());
<?php     public function displayName()

    {

        return get_class($this->event);

    }
<?php     public function __construct($event)

    {

        $this->uniqueId = get_class($event);



        if (method_exists($event, 'uniqueId')) {

            $this->uniqueId .= $event->uniqueId();
<?php     public function hasCommandHandler($command)

    {

        return array_key_exists(get_class($command), $this->handlers);

    }
<?php     public function getCommandHandler($command)

    {

        if ($this->hasCommandHandler($command)) {

            return $this->container->make($this->handlers[get_class($command)]);

        }



        return false;
<?php         if (collect($expectedChain)->contains(fn ($job) => is_object($job))) {

            $expectedChain = collect($expectedChain)->map(fn ($job) => serialize($job))->all();

        } else {

            $chain = collect($this->chained)->map(fn ($job) => get_class(unserialize($job)))->all();

        }



        PHPUnit::assertTrue(
<?php                     ? $job->uniqueId()

                    : ($job->uniqueId ?? '');



        return 'laravel_unique_job:'.get_class($job).':'.$uniqueId;

    }

}
<?php         $doesntSupportInsertOrIgnore = [SqlServerConnection::class];



        if (! in_array(get_class($this->getConnection()), $doesntSupportInsertOrIgnore)) {

            return $this->table()->insertOrIgnore(compact('key', 'value', 'expiration')) > 0;

        }
<?php     protected static function normalizeMethod($callback)

    {

        $class = is_string($callback[0]) ? $callback[0] : get_class($callback[0]);



        return "{$class}@{$callback[1]}";

    }
<?php     public function __construct($model)

    {

        $class = get_class($model);



        parent::__construct("No morph map defined for model [{$class}].");
<?php         $instance = new $model;



        $count = $instance->prunable()

            ->when(in_array(SoftDeletes::class, class_uses_recursive(get_class($instance))), function ($query) {

                $query->withTrashed();

            })->count();
<?php         try {

            $model = $this->laravel->make($class);



            $class = get_class($model);

        } catch (BindingResolutionException $e) {

            $this->components->error($e->getMessage());
<?php                 return [

                    'name' => $method->getName(),

                    'type' => Str::afterLast(get_class($relation), '\\'),

                    'related' => get_class($relation->getRelated()),

                ];

            })