PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

The Hashable interface | JavaScript入門&応用&リファレンスなら「JavaScriptist」


The Hashable interface

(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう)


Hashable is an interface which allows objects to be used as keys. It’s an alternative to spl_object_hash(), which determines an object’s hash based on its handle: this means that two objects that are considered equal by an implicit definition would not treated as equal because they are not the same instance.

hash() is used to return a scalar value to be used as the object's hash value, which determines where it goes in the hash table. While this value does not have to be unique, objects which are equal must have the same hash value.

equals() is used to determine if two objects are equal. It's guaranteed that the comparing object will be an instance of the same class as the subject.


Ds\Hashable {
/* メソッド */
abstract public bool equals ( object $obj )
abstract public mixed hash ( void )



フォーラムで「The Hashable interface」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | The Hashable interface」をGoogle検索
copyright © 1997-2022 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: