[php-src] Issue #22860: ReflectionProperty::hasDefault return false on promoted property

[email protected] (Norbytus) Wed, 22 Jul 2026 15:11:02 +0000
Newsgroups php.bugs
Message-ID <[email protected]>
Issue: https://github.com/php/php-src/issues/22860
Author: Norbytus

### Description

The following code:

```php
<?php
class A {
    function __construct(
        public string $value = '',
    ) {
    }
}
$propInfo = new ReflectionProperty('A', 'value');
var_dump($propInfo->hasDefaultValue());


```

bool(false)
```
```

bool(true)
```
```


### PHP Version

```plain
PHP 8.4.20 (cli) (built: May 25 2026 09:46:41) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.20, Copyright (c) Zend Technologies
```

### Operating System

archlinux 2026.07.01