Insertion into list nodes ----- stmts[] = new Stmt\Expression(new Expr\Variable('baz')); ----- params[] = new Node\Param(new Expr\Variable('param2')); ----- catches[0]->types[] = new Node\Name('Bar'); ----- params, new Node\Param(new Expr\Variable('param0'))); /* Insertion at the start not handled yet */ ----- elseifs[] = new Stmt\ElseIf_(new Expr\Variable('cond3'), []); ----- catches[] = new Stmt\Catch_([new Node\Name('Bar')], new Expr\Variable('bar'), []); ----- setAttribute('comments', [new Comment('// Test')]); $stmts[] = $node; ----- setAttribute('comments', [new Comment('// Test'), new Comment('// Test 2')]); $stmts[0]->stmts[] = $node; ----- name->parts[0] = 'Xyz'; -----