init as $init) { if (ExpressionChecker::analyze($statements_checker, $init, $context) === false) { return false; } } $for_context = clone $context; $for_context->inside_loop = true; LoopChecker::analyze($statements_checker, $stmt->stmts, $stmt->cond, $stmt->loop, $for_context, $context); $context->vars_possibly_in_scope = array_merge( $for_context->vars_possibly_in_scope, $context->vars_possibly_in_scope ); $context->referenced_var_ids = array_merge( $for_context->referenced_var_ids, $context->referenced_var_ids ); return null; } }