parents[0]->getAttribute('currentNode') === 'stmts'; if (!($node->var instanceof List_ || $node->var instanceof Array_) || $isStmt) { return; } $list = $node->var; $var = $ctx->getVariable(); $assignments = ListReference::splitList($list, $var); // On newer versions of php, the list assignment expression returns the original array $ctx->insertBefore($node, new Assign($var, $node->expr), ...$assignments); return $var; } }