Object equality
| From: | Robert Silva | Date: | Sat, 25 Sep 2004 05:54:09 +0000 |
| Subject: | Object equality | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-12978@lists.php.net to get a copy of this message | ||
Hi Andi,
Based on your response to my question on how to compare object equality
properly. While looking through the code, in zend_operators.c in the
is_identical_function, when comparing objects, it uses the same construct I
came up with...
result->value.lval = (Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2));
Just an FYI, if comparing both object_handle and object_handlers are
required for checking true equality. A Z_OBJ_COMPARE_P macro sounds nice.
Bob Silva