xref: /PHP-8.3/ext/reflection/tests/020.phpt (revision f8d79582)
1--TEST--
2ReflectionObject::hasProperty
3--FILE--
4<?php
5class Foo {
6    public    $p1;
7    protected $p2;
8    private   $p3;
9
10    function __isset($name) {
11        var_dump($name);
12        return false;
13    }
14}
15$obj = new ReflectionObject(new Foo());
16var_dump($obj->hasProperty("p1"));
17var_dump($obj->hasProperty("p2"));
18var_dump($obj->hasProperty("p3"));
19var_dump($obj->hasProperty("p4"));
20?>
21--EXPECT--
22bool(true)
23bool(true)
24bool(true)
25bool(false)
26