1--TEST--
2Validation for "Attribute" uses the class scope when evaluating constant ASTs
3--FILE--
4<?php
5#[Attribute(parent::x)]
6class x extends y {}
7
8class y {
9    protected const x = Attribute::TARGET_CLASS;
10}
11
12#[x]
13class z {}
14
15var_dump((new ReflectionClass(z::class))->getAttributes()[0]->newInstance());
16?>
17--EXPECT--
18object(x)#1 (0) {
19}
20