Skip to content

Commit f75308e

Browse files
committed
Micro optimization
1 parent dc72b70 commit f75308e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,7 +2750,7 @@ PHPAPI int php_array_replace_recursive(HashTable *dest, HashTable *src) /* {{{ *
27502750
}
27512751
/* }}} */
27522752

2753-
static void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive, int replace) /* {{{ */
2753+
static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive, int replace) /* {{{ */
27542754
{
27552755
zval *args = NULL;
27562756
zval *arg;
@@ -2989,7 +2989,7 @@ PHP_FUNCTION(array_values)
29892989
/* Go through input array and add values to the return array */
29902990
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
29912991
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(input), entry) {
2992-
if (Z_ISREF_P(entry) && Z_REFCOUNT_P(entry) == 1) {
2992+
if (UNEXPECTED(Z_ISREF_P(entry) && Z_REFCOUNT_P(entry) == 1)) {
29932993
entry = Z_REFVAL_P(entry);
29942994
}
29952995
Z_TRY_ADDREF_P(entry);

0 commit comments

Comments
 (0)