<?php class Foo { public mixed $data { get => $this->data; set => $this->data = $value; } } function my_isset(object $object, string $property): bool { $r = new ReflectionProperty($object::class, $property); return $r->isInitialized($object) && $r->getValue($object) !== null; } $foo = new Foo(); var_dump(my_isset($foo, 'data')); $foo->data = 42; var_dump(my_isset($foo, 'data'));
You have javascript disabled. You will not be able to edit any code.