1--TEST-- 2Attribute flags type is validated. 3--FILE-- 4<?php 5 6#[Attribute("foo")] 7class A1 { } 8 9#[A1] 10class Foo {} 11 12try { 13 (new ReflectionClass(Foo::class))->getAttributes()[0]->newInstance(); 14} catch (Error $e) { 15 echo $e->getMessage(), "\n"; 16} 17 18?> 19--EXPECT-- 20Attribute::__construct(): Argument #1 ($flags) must be of type int, string given 21