Skip to content

Commit 2649a9e

Browse files
committed
Removed useless dereferences
1 parent ccb5591 commit 2649a9e

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

ext/standard/array.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,6 @@ PHP_FUNCTION(min)
13161316
}
13171317
}
13181318

1319-
ZVAL_DEREF(min);
13201319
ZVAL_COPY(return_value, min);
13211320
}
13221321
}
@@ -1363,7 +1362,6 @@ PHP_FUNCTION(max)
13631362
}
13641363
}
13651364

1366-
ZVAL_DEREF(max);
13671365
ZVAL_COPY(return_value, max);
13681366
}
13691367
}
@@ -3812,7 +3810,6 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
38123810
for (i = 0; i < argc; i++) {
38133811
zval *arg = args + i;
38143812

3815-
ZVAL_DEREF(arg);
38163813
if (Z_TYPE_P(arg) != IS_ARRAY) {
38173814
php_error_docref(NULL, E_WARNING, "Argument #%d is not an array", i + 1);
38183815
RETURN_NULL();
@@ -3825,19 +3822,16 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
38253822

38263823
/* copy first array */
38273824
arg = args;
3828-
ZVAL_DEREF(arg);
38293825
dest = zend_array_dup(Z_ARRVAL_P(arg));
38303826
ZVAL_ARR(return_value, dest);
38313827
if (recursive) {
38323828
for (i = 1; i < argc; i++) {
38333829
arg = args + i;
3834-
ZVAL_DEREF(arg);
38353830
php_array_replace_recursive(dest, Z_ARRVAL_P(arg));
38363831
}
38373832
} else {
38383833
for (i = 1; i < argc; i++) {
38393834
arg = args + i;
3840-
ZVAL_DEREF(arg);
38413835
zend_hash_merge(dest, Z_ARRVAL_P(arg), zval_add_ref, 1);
38423836
}
38433837
}
@@ -3846,7 +3840,6 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
38463840
HashTable *src, *dest;
38473841

38483842
arg = args;
3849-
ZVAL_DEREF(arg);
38503843
src = Z_ARRVAL_P(arg);
38513844
/* copy first array */
38523845
array_init_size(return_value, zend_hash_num_elements(src));
@@ -3881,13 +3874,11 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
38813874
if (recursive) {
38823875
for (i = 1; i < argc; i++) {
38833876
arg = args + i;
3884-
ZVAL_DEREF(arg);
38853877
php_array_merge_recursive(dest, Z_ARRVAL_P(arg));
38863878
}
38873879
} else {
38883880
for (i = 1; i < argc; i++) {
38893881
arg = args + i;
3890-
ZVAL_DEREF(arg);
38913882
php_array_merge(dest, Z_ARRVAL_P(arg));
38923883
}
38933884
}

0 commit comments

Comments
 (0)