Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is an object
<?php is_object(mixed $value): bool
<?php     protected function augmentValue($value)

    {

        if (! is_object($value)) {

            $value = Entry::find($value);

        }
<?php         }




        $item = is_object($value) ? $value : Data::find($value);




        if (! $item) {
<?php     private function getGroupByValue($item, $groupBy)

    {

        $value = is_object($item)

            ? $this->getGroupByValueFromObject($item, $groupBy)

            : $item[$groupBy];
<?php             foreach ($this->items as $key => $item) {

                $resolvedKey = $keyBy($item, $key);



                if (is_object($resolvedKey)) {

                    $resolvedKey = (string) $resolvedKey;

                }
<?php             return $this;

        }



        if (is_object($reference)) {

            throw_unless($id = $reference->id(), new \Exception('Cannot set an entry without an ID'));

            Blink::store('structure-entries')->put($id, $reference);

            $reference = $id;
<?php         if (is_string($page)) {

            $page = [$this->idKey() => $page];

        } elseif (is_object($page)) {

            $page = [$this->idKey() => $page->id()];

        }
<?php         }




        if (is_object($one) || is_object($two)) {

            if (is_object($one) && ! is_object($two)) {

                return 1;

            } elseif (! is_object($one) && is_object($two)) {
<?php         if (is_object($one) || is_object($two)) {

            if (is_object($one) && ! is_object($two)) {

                return 1;

            } elseif (! is_object($one) && is_object($two)) {

                return -1;
<?php         if (is_object($one) || is_object($two)) {

            if (is_object($one) && ! is_object($two)) {

                return 1;

            } elseif (! is_object($one) && is_object($two)) {

                return -1;

            }
<?php             $value = $value->value();

        }



        if (is_object($value)) {

            throw new \LogicException("Cannot query [$field] using value [".get_class($value).']');

        }
<?php             return $value->getBags() ? 'true' : 'false';

        } elseif (is_array($value)) {

            return ! empty($value) ? 'true' : 'false';

        } elseif (is_object($value) and is_callable([$value, '__toString'])) {

            return var_export((string) $value, true);

        } elseif (is_object($value)) {

            return 'true';
<?php             return ! empty($value) ? 'true' : 'false';

        } elseif (is_object($value) and is_callable([$value, '__toString'])) {

            return var_export((string) $value, true);

        } elseif (is_object($value)) {

            return 'true';

        } else {

            return var_export($value, true);
<?php             Log::debug("Cannot render an array variable as a string: {{ $variable }}");

        }



        if (is_object($value) && ! method_exists($value, '__toString')) {

            $value = null;

            Log::debug("Cannot render an object variable as a string: {{ $variable }}");

        }