Dutch PHP Conference 2025 - Call For Papers

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.

Зауваження:

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

Застереження

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.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top