[php-src] Issue #15438: Hooks on constructor promoted properties without visibility are ignored
| From: | iluuu1994 | Date: | Fri, 16 Aug 2024 10:27:41 +0000 |
| Subject: | [php-src] Issue #15438: Hooks on constructor promoted properties without visibility are ignored | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247511@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15438
Author: iluuu1994
### Description
The following code:
```php
class C {
public function __construct(
$prop { set => $value * 2; },
) {}
}
$c = new C(42);
var_dump($c);
```
Resulted in this output:
```
object(C)#1 (0) {
}
```
But I expected this output instead:
```
object(C)#1 (1) {
["prop"]=>
int(84)
}
```
Or compile error
### PHP Version
master
### Operating System
_No response_