<?php
declare(strict_types=1);
class P {
public function __construct(public int $x) {}
}
$a = new P(1);
$b = new P(1);
$c = $a;
// == is true for the same class with equal properties
var_dump($a == $b);
// === is true only for the very same instance
var_dump($a === $b);
var_dump($a === $c);== equal contents, === same instance