php-parser/test/code/prettyPrinter/stmt/attributes.test
2021-12-15 14:09:30 +01:00

61 lines
589 B
Plaintext

Attributes
-----
<?php
#[
A1,
A2(),
A3(0),
A4(x: 1),
]
function a() {
}
#[A5]
class C {
#[A6]
public function m(
#[A7] $param,
) {}
#[A12]
public $prop;
}
#[A8]
interface I {}
#[A9]
trait T {}
$x = #[A10] function() {};
$y = #[A11] fn() => 0;
new #[A13] class {};
-----
!!php7
#[A1, A2, A3(0), A4(x: 1)]
function a()
{
}
#[A5]
class C
{
#[A6]
public function m(#[A7] $param)
{
}
#[A12]
public $prop;
}
#[A8]
interface I
{
}
#[A9]
trait T
{
}
$x = #[A10] function () {
};
$y = #[A11] fn() => (0);
new #[A13] class
{
};