[php-src] Issue #21309: Backport #[DelayedTargetValidation] to 8.3 + 8.4

[email protected] (kkmuffme)
Newsgroups php.bugs
Message-ID <2jz0AdK3K2luaLMc2sK391K0FlV44mto6yh5Cncv6Xk@main.internal.php.net>
Issue: https://github.com/php/php-src/issues/21309
Author: kkmuffme

### Description

```
class A {
    public const XYZ = 'hello';
	
    public string $bar = '';
    
    public function __construct($a) {
        $this->bar = $a;
    }
}

class B extends A {
    #[DelayedTargetValidation]
    #[Override]
    public const XYZ = 'world';
	
    public string $bar = 'asd';

    #[DelayedTargetValidation]
    #[Deprecated]
    public string $ddd = 'asd';
}

$b = new B('a');

echo $b->ddd;
```

This code works in PHP <= 8.2 and >= 8.5
(the Deprecated case in <=8.3 and >= 8.5)
since #[DelayedTargetValidation] was only added in 8.5 - creating a gap of 8.3 and 8.4

This means that 2 important (since they're among the first that were implemented) built-in attributes can't be used for many use cases until at least 5 more years (looking at how common PHP 7.4 still is, despite it being unmaintained since years, just like how it was with PHP 5.6 too back then)

I'm not familiar if possible at all, but would it theoretically be possible to backport `#[DelayedTargetValidation]` to also work in 8.3 + 8.4?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.