Re: [RFC] User-defined object comparison
| From: | Wes | Date: | Wed, 27 Jun 2018 13:30:47 +0000 |
| Subject: | Re: [RFC] User-defined object comparison | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-102483@lists.php.net to get a copy of this message | ||
not some class, only same comparator function. e.g. this is ok, as __equals
is the same for both classes
trait X{ function __equals($o){ ... } }
class A{ use X; }
class B{ use X; }
assert((new A) == (new B));