summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2015-06-20 10:48:18 +0800
committerXinchen Hui <laruence@php.net>2015-06-20 10:52:58 +0800
commitf75308eda1b432ddf3d81e5378eceebf44658ffb (patch)
treea7cd9897933023d3ea02747432d18a5cc87a68ca
parentdc72b70b7e3b2234d9dd3846ab184676cb992982 (diff)
downloadphp-git-f75308eda1b432ddf3d81e5378eceebf44658ffb.tar.gz
Micro optimization
-rw-r--r--ext/standard/array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index a8e56c07cd..fdfb9107d9 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2750,7 +2750,7 @@ PHPAPI int php_array_replace_recursive(HashTable *dest, HashTable *src) /* {{{ *
}
/* }}} */
-static void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive, int replace) /* {{{ */
+static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive, int replace) /* {{{ */
{
zval *args = NULL;
zval *arg;
@@ -2989,7 +2989,7 @@ PHP_FUNCTION(array_values)
/* Go through input array and add values to the return array */
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(input), entry) {
- if (Z_ISREF_P(entry) && Z_REFCOUNT_P(entry) == 1) {
+ if (UNEXPECTED(Z_ISREF_P(entry) && Z_REFCOUNT_P(entry) == 1)) {
entry = Z_REFVAL_P(entry);
}
Z_TRY_ADDREF_P(entry);