[php-src] Issue #22271: Invalid case in ReflectionClass::getProperty
[email protected] (jorgsowa) Wed, 10 Jun 2026 17:56:29 +0000
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
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_