[php-src] Issue #11423: [PHP 8.3] internal constants have their namespace lowercased
| From: | ju1ius | Date: | Sun, 11 Jun 2023 07:06:33 +0000 |
| Subject: | [php-src] Issue #11423: [PHP 8.3] internal constants have their namespace lowercased | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244656@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11423
Author: ju1ius
### Description
The following code:
```c
static char* NAME = "Foo\\Bar\\BAZ";
zend_register_long_constant(NAME, strlen(NAME), 42, CONST_CS|CONST_PERSISTENT, module_number);
```
```php
$re = new \ReflectionExtension('my_extension');
var_dump($re->getConstants());
```
Resulted in this output:
```
array(1) {
["foo\bar\BAZ"]=>
int(42)
}
```
But I expected this output instead:
```
array(1) {
["Foo\Bar\BAZ"]=>
int(42)
}
```
This behaviour was introduced in php 8.3, probably due to the removal of the
name field
of the zend_constant struct.
### PHP Version
PHP 8.3-dev
### Operating System
irrelevant