[php-src] Issue #11122: get_declared_classes( ) return always lowercases for class aliases
| From: | mrVrAlex | Date: | Sun, 23 Apr 2023 13:59:53 +0000 |
| Subject: | [php-src] Issue #11122: get_declared_classes( ) return always lowercases for class aliases | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244256@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11122
Author: mrVrAlex
### Description
The following code:
```php
<?php
class AAA {}
$alias = 'BBB';
class_alias('AAA', $alias);
var_dump(in_array($alias, get_declared_classes()));
var_dump(in_array(strtolower($alias), get_declared_classes()));
```
Resulted in this output:
```
bool(false)
bool(true)
```
But I expected this output instead:
```
bool(true)
bool(false)
```
https://3v4l.org/ihZiR
This is bug or normal?
### PHP Version
latest
### Operating System
_No response_