[php-src] Issue #22271: Invalid case in ReflectionClass::getProperty
| From: | jorgsowa | Date: | Wed, 10 Jun 2026 17:56:29 +0000 |
| Subject: | [php-src] Issue #22271: Invalid case in ReflectionClass::getProperty | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252177@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/22271
Author: jorgsowa
### Description
The following code:
```php
<?php
class C {
public $p;
}
spl_autoload_register(function ($name) {
echo "Autoloading $name\n";
});
$rc = new ReflectionClass('C');
try {
$rc->getProperty("Some\\MixedCase::p");
} catch (ReflectionException $e) {
echo $e->getMessage(), "\n";
}
```
Resulted in this output:
```
Autoloading some\mixedcase
Class "some\mixedcase" does not exist
```
But I expected this output instead:
```
Autoloading Some\MixedCase
Class "Some\MixedCase" does not exist
```
### PHP Version
```plain
master
```
### Operating System
_No response_