11 $stmts[0]->exprs[0]->left->right->value = 42;
25 $stmts[0]->name = new Node\Identifier('bar');
39 // This triggers a fallback
40 $stmts[0]->byRef = true;
57 // This triggers a fallback
58 $stmts[0]->byRef = true;
77 $tmp = $stmts[0]->stmts[0];
78 $stmts[0]->stmts[0] = $stmts[1];
102 $tmp = $stmts[1]->stmts[0];
103 $stmts[1]->stmts[0] = $stmts[2];
105 // Same test, but also removing first statement, triggering fallback
106 array_splice($stmts, 0, 1, []);
122 $stmts[0] = new Stmt\Expression(
123 new Expr\Assign(new Expr\Variable('a'), new Expr\Variable('b')));
131 $stmts[0]->exprs[0] = new Expr\ConstFetch(new Node\Name('C'));
150 $stmts[0] = $stmts[1];
152 /* TODO This used to do two replacement operations, but with the node list diffing this is a
153 * remove, keep, add (which probably makes more sense). As such, this currently triggers a
169 echo "${foo['baz']}bar";
171 $stmts[0]->exprs[0]->parts[0] = new Expr\Variable('bar');
172 $stmts[1]->exprs[0]->parts[0] = new Expr\Variable('bar');