setLogger( new class { /* testNestedAnonClassProp */ private $varName = 'hello'; }); if ( has_filter( 'comments_open' ) === false ) { add_filter( 'comments_open', new class { /* testDoubleNestedAnonClassProp */ public $year = 2017; // Ok. /* testDoubleNestedAnonClassMethodParameter */ public function __construct( $open, $post_id ) { /* testDoubleNestedAnonClassMethodLocalVar */ global $page; } /* testFunctionCallParameter */ }, $priority, 2 ); } enum MyEnum { // Intentional parse error. Properties are not allowed in enums. /* testEnumProp */ public $enumProp = false; /* testEnumMethodParameter */ public function something($param = false); }