summaryrefslogtreecommitdiff
path: root/Zend/zend_builtin_functions.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2013-11-01 16:16:58 +0100
committerBob Weinand <bobwei9@hotmail.com>2013-11-01 16:16:58 +0100
commitb45043a1b71c29a0c7b8de9e4929dde08bd61216 (patch)
tree07e97d65a100eef0cfc1bb998f649475380d612d /Zend/zend_builtin_functions.c
parentb56c1ca95e16ea1c2a3ce251b91297d0a81a9070 (diff)
downloadphp-git-b45043a1b71c29a0c7b8de9e4929dde08bd61216.tar.gz
converted several switches to ifs and made more opcache friendly
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r--Zend/zend_builtin_functions.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index b3b7529d9b..049864c54a 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -946,11 +946,8 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
/* this is necessary to make it able to work with default array
* properties, returned to user */
- switch (Z_TYPE_P(prop_copy) & IS_CONSTANT_TYPE_MASK) {
- case IS_CONSTANT:
- case IS_CONSTANT_ARRAY:
- case IS_CONSTANT_AST:
- zval_update_constant(&prop_copy, 0 TSRMLS_CC);
+ switch (IS_CONSTANT_TYPE(Z_TYPE_P(prop_copy))) {
+ zval_update_constant(&prop_copy, 0 TSRMLS_CC);
}
add_assoc_zval(return_value, key, prop_copy);