property_exists

Supported Versions: PHP 5 >= 5.1.0, PHP 7, PHP 8
Checks if the object or class has a property
<?php property_exists(object|string $object_or_class, string $property): bool
<?php         $this->toBeObject();




        Assert::assertTrue(property_exists($this->value, $name), $message);



        if (! $value instanceof Any) {
<?php                 InvalidExpectationValue::expected('object|string');

            }



            Assert::assertTrue(property_exists($this->value, $property), $message);




            $propertyValue = $this->value->{$property};
<?php     public function __get(string $property)

    {

        if (property_exists($this->target, $property)) {

            return $this->target->{$property}; // @phpstan-ignore-line

        }