Ds\Hashable::equals

(PECL ds >= 1.0.0)

Ds\Hashable::equalsDetermines whether an object is equal to the current instance

说明

abstract public Ds\Hashable::equals ( object $obj ) : bool

Determines whether another object is equal to the current instance.

This method allows objects to be used as keys in structures such as Ds\Map and Ds\Set, or any other lookup structure that honors this interface.

Note:

It's guaranteed that obj is an instance of the same class.

Caution

It's important that objects which are equal also have the same hash value. See Ds\Hashable::hash().

参数

obj

The object to compare the current instance to, which is always an instance of the same class.

返回值

TRUE if equal, FALSE otherwise.

相关文章
php hashable determines whether an object is equal to the current instancephp evloop creates evcheck object associated with the current event loop instancephp evloop creates an instance of evembed watcher associated with the current evloop objectphp evloop creates evfork watcher object associated with the current event loop instancephp evloop creates evidle watcher object associated with the current event loop instancephp evloop create evio watcher object associated with the current event loop instancephp evloop creates evperiodic watcher object associated with the current event loop instancephp evloop creates evprepare watcher object associated with the current event loop instancephp evloop creates evsignal watcher object associated with the current event loop instancephp evloop creates evstat watcher object associated with the current event loop instancephp evloop creates evtimer watcher object associated with the current event loop instancephp intlcalendar whether the objectʼs time is in daylight savings timephp intlcalendar whether another calendar is equal but for a different timephp limititerator check whether the current element is validphp oci lob changes current state of buffering for the large objectphp recursivearrayiterator returns whether current entry is an array or an objectphp recursivecachingiterator check whether the current element of the inner iterator has childrenphp splobjectstorage checks whether an object exists in the storagephp swftext writes the given text into this swftext object at the current pen position using the current font height spacing and colorphp swoole atomic get the current value of the atomic object.
关注编程学问公众号