--TEST-- AST printing for closures in attributes --FILE-- getMessage(), "\n"; } try { \assert( ! new #[Attr(static function ($foo) { echo $foo; })] class {} ); } catch (Error $e) { echo $e->getMessage(), "\n"; } ?> --EXPECT-- assert(!#[Attr(static function ($foo) { echo $foo; })] function () { }) assert(!new #[Attr(static function ($foo) { echo $foo; })] class { })