xref: /PHP-8.3/ext/reflection/tests/bug30209.phpt (revision f8d79582)
1--TEST--
2Reflection Bug #30209 (ReflectionClass::getMethod() lowercases attribute)
3--FILE--
4<?php
5
6class Foo
7{
8    private $name = 'testBAR';
9
10    public function testBAR()
11    {
12        try
13        {
14            $class  = new ReflectionClass($this);
15            var_dump($this->name);
16            $method = $class->getMethod($this->name);
17            var_dump($this->name);
18        }
19
20        catch (Exception $e) {}
21    }
22}
23
24$foo = new Foo;
25$foo->testBAR();
26?>
27--EXPECT--
28string(7) "testBAR"
29string(7) "testBAR"
30