@@ -2670,14 +2670,14 @@ PHP_FUNCTION(array_fill_keys)
2670
2670
/* {{{ Create an array containing the range of integers or characters from low to high (inclusive) */
2671
2671
PHP_FUNCTION (range )
2672
2672
{
2673
- zval * zlow , * zhigh , * user_step = NULL , tmp ;
2673
+ zval * user_start , * user_end , * user_step = NULL , tmp ;
2674
2674
bool err = 0 , is_step_double = false;
2675
2675
double step_double = 1.0 ;
2676
2676
zend_long step = 1 ;
2677
2677
2678
2678
ZEND_PARSE_PARAMETERS_START (2 , 3 )
2679
- Z_PARAM_NUMBER_OR_STR (zlow )
2680
- Z_PARAM_NUMBER_OR_STR (zhigh )
2679
+ Z_PARAM_NUMBER_OR_STR (user_start )
2680
+ Z_PARAM_NUMBER_OR_STR (user_end )
2681
2681
Z_PARAM_OPTIONAL
2682
2682
Z_PARAM_NUMBER (user_step )
2683
2683
ZEND_PARSE_PARAMETERS_END ();
@@ -2718,21 +2718,21 @@ PHP_FUNCTION(range)
2718
2718
}
2719
2719
2720
2720
/* If the range is given as strings, generate an array of characters. */
2721
- if (Z_TYPE_P (zlow ) == IS_STRING && Z_TYPE_P (zhigh ) == IS_STRING && Z_STRLEN_P (zlow ) >= 1 && Z_STRLEN_P (zhigh ) >= 1 ) {
2721
+ if (Z_TYPE_P (user_start ) == IS_STRING && Z_TYPE_P (user_end ) == IS_STRING && Z_STRLEN_P (user_start ) >= 1 && Z_STRLEN_P (user_end ) >= 1 ) {
2722
2722
int type1 , type2 ;
2723
2723
unsigned char low , high ;
2724
2724
2725
- type1 = is_numeric_string (Z_STRVAL_P (zlow ), Z_STRLEN_P (zlow ), NULL , NULL , 0 );
2726
- type2 = is_numeric_string (Z_STRVAL_P (zhigh ), Z_STRLEN_P (zhigh ), NULL , NULL , 0 );
2725
+ type1 = is_numeric_string (Z_STRVAL_P (user_start ), Z_STRLEN_P (user_start ), NULL , NULL , 0 );
2726
+ type2 = is_numeric_string (Z_STRVAL_P (user_end ), Z_STRLEN_P (user_end ), NULL , NULL , 0 );
2727
2727
2728
2728
if (type1 == IS_DOUBLE || type2 == IS_DOUBLE || is_step_double ) {
2729
2729
goto double_str ;
2730
2730
} else if (type1 == IS_LONG || type2 == IS_LONG ) {
2731
2731
goto long_str ;
2732
2732
}
2733
2733
2734
- low = (unsigned char )Z_STRVAL_P (zlow )[0 ];
2735
- high = (unsigned char )Z_STRVAL_P (zhigh )[0 ];
2734
+ low = (unsigned char )Z_STRVAL_P (user_start )[0 ];
2735
+ high = (unsigned char )Z_STRVAL_P (user_end )[0 ];
2736
2736
2737
2737
if (low > high ) { /* Negative Steps */
2738
2738
if (low - high < step ) {
@@ -2772,12 +2772,12 @@ PHP_FUNCTION(range)
2772
2772
ZVAL_CHAR (& tmp , low );
2773
2773
zend_hash_next_index_insert_new (Z_ARRVAL_P (return_value ), & tmp );
2774
2774
}
2775
- } else if (Z_TYPE_P (zlow ) == IS_DOUBLE || Z_TYPE_P (zhigh ) == IS_DOUBLE || is_step_double ) {
2775
+ } else if (Z_TYPE_P (user_start ) == IS_DOUBLE || Z_TYPE_P (user_end ) == IS_DOUBLE || is_step_double ) {
2776
2776
double low , high , element ;
2777
2777
uint32_t i , size ;
2778
2778
double_str :
2779
- low = zval_get_double (zlow );
2780
- high = zval_get_double (zhigh );
2779
+ low = zval_get_double (user_start );
2780
+ high = zval_get_double (user_end );
2781
2781
2782
2782
if (zend_isinf (high ) || zend_isinf (low )) {
2783
2783
zend_value_error ("Invalid range supplied: start=%0.0f end=%0.0f" , low , high );
@@ -2823,8 +2823,8 @@ PHP_FUNCTION(range)
2823
2823
zend_ulong unsigned_step ;
2824
2824
uint32_t i , size ;
2825
2825
long_str :
2826
- low = zval_get_long (zlow );
2827
- high = zval_get_long (zhigh );
2826
+ low = zval_get_long (user_start );
2827
+ high = zval_get_long (user_end );
2828
2828
2829
2829
unsigned_step = (zend_ulong )step ;
2830
2830
0 commit comments