@@ -3161,25 +3161,25 @@ static zend_op *zend_delayed_compile_prop(znode *result, zend_ast *ast, uint32_t
31613161 if (nullsafe ) {
31623162 if (obj_node .op_type == IS_TMP_VAR ) {
31633163 /* Flush delayed oplines */
3164- zend_op * opline = NULL , * oplines = zend_stack_base (& CG (delayed_oplines_stack ));
3164+ zend_op * delayed_opline = NULL , * delayed_oplines = zend_stack_base (& CG (delayed_oplines_stack ));
31653165 uint32_t var = obj_node .u .op .var ;
31663166 uint32_t count = zend_stack_count (& CG (delayed_oplines_stack ));
31673167 uint32_t i = count ;
31683168
3169- while (i > 0 && oplines [i - 1 ].result_type == IS_TMP_VAR && oplines [i - 1 ].result .var == var ) {
3169+ while (i > 0 && delayed_oplines [i - 1 ].result_type == IS_TMP_VAR && delayed_oplines [i - 1 ].result .var == var ) {
31703170 i -- ;
3171- if (oplines [i ].op1_type == IS_TMP_VAR ) {
3172- var = oplines [i ].op1 .var ;
3171+ if (delayed_oplines [i ].op1_type == IS_TMP_VAR ) {
3172+ var = delayed_oplines [i ].op1 .var ;
31733173 } else {
31743174 break ;
31753175 }
31763176 }
31773177 for (; i < count ; ++ i ) {
3178- if (oplines [i ].opcode != ZEND_NOP ) {
3179- opline = get_next_op ();
3180- memcpy (opline , & oplines [i ], sizeof (zend_op ));
3181- oplines [i ].opcode = ZEND_NOP ;
3182- oplines [i ].extended_value = opline - CG (active_op_array )-> opcodes ;
3178+ if (delayed_oplines [i ].opcode != ZEND_NOP ) {
3179+ delayed_opline = get_next_op ();
3180+ memcpy (delayed_opline , & delayed_oplines [i ], sizeof (zend_op ));
3181+ delayed_oplines [i ].opcode = ZEND_NOP ;
3182+ delayed_oplines [i ].extended_value = delayed_opline - CG (active_op_array )-> opcodes ;
31833183 }
31843184 }
31853185 }
@@ -4280,7 +4280,6 @@ static void zend_compile_init_user_func(zend_ast *name_ast, uint32_t num_args, z
42804280static zend_result zend_compile_func_cufa (znode * result , zend_ast_list * args , zend_string * lcname ) /* {{{ */
42814281{
42824282 znode arg_node ;
4283- zend_op * opline ;
42844283
42854284 if (args -> children != 2 ) {
42864285 return FAILURE ;
@@ -4322,7 +4321,8 @@ static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, ze
43224321 zend_compile_expr (& arg_node , args -> child [1 ]);
43234322 zend_emit_op (NULL , ZEND_SEND_ARRAY , & arg_node , NULL );
43244323 zend_emit_op (NULL , ZEND_CHECK_UNDEF_ARGS , NULL , NULL );
4325- opline = zend_emit_op (result , ZEND_DO_FCALL , NULL , NULL );
4324+
4325+ zend_op * opline = zend_emit_op (result , ZEND_DO_FCALL , NULL , NULL );
43264326 opline -> extended_value = ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS ;
43274327
43284328 return SUCCESS ;
@@ -4384,9 +4384,9 @@ static void zend_compile_assert(znode *result, zend_ast_list *args, zend_string
43844384 if (args -> child [0 ]-> kind == ZEND_AST_NAMED_ARG ) {
43854385 /* If the original argument was named, add the new argument as named as well,
43864386 * as mixing named and positional is not allowed. */
4387- zend_ast * name = zend_ast_create_zval_from_str (
4387+ zend_ast * name_arg = zend_ast_create_zval_from_str (
43884388 ZSTR_INIT_LITERAL ("description" , 0 ));
4389- arg = zend_ast_create (ZEND_AST_NAMED_ARG , name , arg );
4389+ arg = zend_ast_create (ZEND_AST_NAMED_ARG , name_arg , arg );
43904390 }
43914391 zend_ast_list_add ((zend_ast * ) args , arg );
43924392 }
@@ -7146,13 +7146,13 @@ static zend_type zend_compile_typename_ex(
71467146 type_list -> types [type_list -> num_types ++ ] = single_type ;
71477147
71487148 /* Check for trivially redundant class types */
7149- for (size_t i = 0 ; i < type_list -> num_types - 1 ; i ++ ) {
7150- if (ZEND_TYPE_IS_INTERSECTION (type_list -> types [i ])) {
7151- zend_are_intersection_types_redundant (single_type , type_list -> types [i ]);
7149+ for (size_t type_index = 0 ; i < type_list -> num_types - 1 ; type_index ++ ) {
7150+ if (ZEND_TYPE_IS_INTERSECTION (type_list -> types [type_index ])) {
7151+ zend_are_intersection_types_redundant (single_type , type_list -> types [type_index ]);
71527152 continue ;
71537153 }
71547154 /* Type from type list is a simple type */
7155- zend_is_intersection_type_redundant_by_single_type (single_type , type_list -> types [i ]);
7155+ zend_is_intersection_type_redundant_by_single_type (single_type , type_list -> types [type_index ]);
71567156 }
71577157 continue ;
71587158 }
@@ -7206,10 +7206,10 @@ static zend_type zend_compile_typename_ex(
72067206 }
72077207
72087208 if (type_list -> num_types ) {
7209- zend_type_list * list = zend_arena_alloc (
7209+ zend_type_list * type_list_arena = zend_arena_alloc (
72107210 & CG (arena ), ZEND_TYPE_LIST_SIZE (type_list -> num_types ));
7211- memcpy (list , type_list , ZEND_TYPE_LIST_SIZE (type_list -> num_types ));
7212- ZEND_TYPE_SET_LIST (type , list );
7211+ memcpy (type_list_arena , type_list , ZEND_TYPE_LIST_SIZE (type_list -> num_types ));
7212+ ZEND_TYPE_SET_LIST (type , type_list_arena );
72137213 ZEND_TYPE_FULL_MASK (type ) |= _ZEND_TYPE_ARENA_BIT ;
72147214 /* Inform that the type list is a union type */
72157215 ZEND_TYPE_FULL_MASK (type ) |= _ZEND_TYPE_UNION_BIT ;
@@ -7733,16 +7733,16 @@ static void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32
77337733 }
77347734
77357735 if (is_promoted ) {
7736- zend_op_array * op_array = CG (active_op_array );
7737- zend_class_entry * scope = op_array -> scope ;
7736+ zend_op_array * promoted_prop_op_array = CG (active_op_array );
7737+ zend_class_entry * scope = promoted_prop_op_array -> scope ;
77387738
77397739 bool is_ctor =
7740- scope && zend_is_constructor (op_array -> function_name );
7740+ scope && zend_is_constructor (promoted_prop_op_array -> function_name );
77417741 if (!is_ctor ) {
77427742 zend_error_noreturn (E_COMPILE_ERROR ,
77437743 "Cannot declare promoted property outside a constructor" );
77447744 }
7745- if ((op_array -> fn_flags & ZEND_ACC_ABSTRACT )
7745+ if ((promoted_prop_op_array -> fn_flags & ZEND_ACC_ABSTRACT )
77467746 || (scope -> ce_flags & ZEND_ACC_INTERFACE )) {
77477747 zend_error_noreturn (E_COMPILE_ERROR ,
77487748 "Cannot declare promoted property in an abstract constructor" );
@@ -8003,9 +8003,8 @@ static void zend_compile_closure_uses(zend_ast *ast) /* {{{ */
80038003 ZVAL_NULL (& zv );
80048004
80058005 {
8006- int i ;
8007- for (i = 0 ; i < op_array -> last_var ; i ++ ) {
8008- if (zend_string_equals (op_array -> vars [i ], var_name )) {
8006+ for (int var_index = 0 ; var_index < op_array -> last_var ; var_index ++ ) {
8007+ if (zend_string_equals (op_array -> vars [var_index ], var_name )) {
80098008 zend_error_noreturn_unchecked (E_COMPILE_ERROR ,
80108009 "Cannot use lexical variable $%S as a parameter name" , var_name );
80118010 }
0 commit comments