summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-05-13 14:55:08 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-05-13 14:56:05 +0200
commitc6a6ca078becd374c083a66aa938f3a6cfcceb53 (patch)
treeb040253616f48930900fde9648df1dbd5e375f96 /Zend/zend_operators.c
parent3f51d82bcabdd9c42d518758a68a4431e20f3e28 (diff)
downloadphp-git-c6a6ca078becd374c083a66aa938f3a6cfcceb53.tar.gz
Use zend_zval_type_name() API where possible
Rather than zend_get_type_by_const(Z_TYPE_P()).
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 53cc6e45ea..c8360fbf39 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -936,7 +936,7 @@ static ZEND_COLD zend_never_inline void ZEND_FASTCALL zend_binop_error(const cha
}
zend_type_error("Unsupported operand types: %s %s %s",
- zend_get_type_by_const(Z_TYPE_P(op1)), operator, zend_get_type_by_const(Z_TYPE_P(op2)));
+ zend_zval_type_name(op1), operator, zend_zval_type_name(op2));
}
/* }}} */
@@ -1468,8 +1468,7 @@ try_again:
if (result != op1) {
ZVAL_UNDEF(result);
}
- zend_type_error("Cannot perform bitwise not on %s",
- zend_get_type_by_const(Z_TYPE_P(op1)));
+ zend_type_error("Cannot perform bitwise not on %s", zend_zval_type_name(op1));
return FAILURE;
}
}
@@ -2376,7 +2375,7 @@ try_again:
/* break missing intentionally */
case IS_RESOURCE:
case IS_ARRAY:
- zend_type_error("Cannot increment %s", zend_get_type_by_const(Z_TYPE_P(op1)));
+ zend_type_error("Cannot increment %s", zend_zval_type_name(op1));
return FAILURE;
EMPTY_SWITCH_DEFAULT_CASE()
}
@@ -2438,7 +2437,7 @@ try_again:
/* break missing intentionally */
case IS_RESOURCE:
case IS_ARRAY:
- zend_type_error("Cannot decrement %s", zend_get_type_by_const(Z_TYPE_P(op1)));
+ zend_type_error("Cannot decrement %s", zend_zval_type_name(op1));
return FAILURE;
EMPTY_SWITCH_DEFAULT_CASE()
}