summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 69570054e1..2ef03fc2a5 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -914,6 +914,25 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
}
+ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
+{
+ if (op1->type != op2->type) {
+ convert_to_boolean(result);
+ result->value.lval = 0;
+ return SUCCESS;
+ }
+ if (compare_function(result, op1, op2) == FAILURE) {
+ return FAILURE;
+ }
+ convert_to_boolean(result);
+ if (result->value.lval == 0) {
+ result->value.lval = 1;
+ } else {
+ result->value.lval = 0;
+ }
+ return SUCCESS;
+}
+
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2)
{
if (compare_function(result, op1, op2) == FAILURE) {