<?php
declare(strict_types=1);
$a = new stdClass();
$b = new stdClass();
// the same object always has the same id
var_dump(spl_object_id($a) === spl_object_id($a));
// different objects have different ids
var_dump(spl_object_id($a) === spl_object_id($b));spl_object_id is unique per instance