Index: Zend/zend_operators.c =================================================================== RCS file: /repository/ZendEngine2/zend_operators.c,v retrieving revision 1.208.2.4.2.21 diff -u -p -d -r1.208.2.4.2.21 zend_operators.c --- Zend/zend_operators.c 23 Apr 2007 09:56:30 -0000 1.208.2.4.2.21 +++ Zend/zend_operators.c 6 Jun 2007 11:24:12 -0000 @@ -1402,6 +1402,11 @@ ZEND_API int compare_function(zval *resu /* If both are objects sharing the same comparision handler then use is */ if (eq_comp) { + if (Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2)) { + /* object handles are identical, apprently this is the same object */ + ZVAL_LONG(result, 0); + COMPARE_RETURN_AND_FREE(SUCCESS); + } ZVAL_LONG(result, Z_OBJ_HT_P(op1)->compare_objects(op1, op2 TSRMLS_CC)); COMPARE_RETURN_AND_FREE(SUCCESS); }