Closed
Description
Description
The following code:
<?php
class Dnf
{
private A|(B&C) $a; // valid
private (B&C)|A $b; // valid
private readonly A|(B&C) $c; // valid
private readonly (B&C)|A $d; // invalid?
}
Resulted in this output:
Parse error: syntax error, unexpected token "(", expecting variable in app/test.php on line 7
But I expected this output instead:
PHP Version
php:8.2.0RC1-zts-alpine3.16
Operating System
No response