diff options
| author | Andi Gutmans <andi@php.net> | 1999-10-19 13:33:17 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 1999-10-19 13:33:17 +0000 |
| commit | 7a205f6087892996b2a2e3deabcf8a714e4b9d96 (patch) | |
| tree | 251d8390481c10c8bd97dd8e1a6ee02a18c2b5f8 /Zend/zend_operators.c | |
| parent | 578c6035c8d54a8223b8ff2364f34902b144dc47 (diff) | |
| download | php-git-7a205f6087892996b2a2e3deabcf8a714e4b9d96.tar.gz | |
- Preliminary submit of Thie's patch. Will fix the rest on Windows
as this was added on UNIX with patch. Changed IS_SAME -> IS_IDENTICAL
Diffstat (limited to 'Zend/zend_operators.c')
| -rw-r--r-- | Zend/zend_operators.c | 19 |
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) { |
