HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

spl_object_hash

Description

The spl_object_hash of SPL for PHP returns the hash id for a given object.

Syntax

spl_object_hash(
    object $object
): string

Parameters

object

Any object.

Return

Returns a string that is unique for each currently existing object and is always the same for each object.

Examples

1 · object

<?

class myclass
{
}

$object = new myclass();

$return = spl_object_hash($object);

echo $return;
00000000000000010000000000000000