Suppose I have two DateTimeImmutable objects, let's say $a and $b, and I want to check whether they are referring to the same point in time.
You can't user $a === $b for this, because that would always return false. But if you use $a == $b, phpa will complain.
Any suggestions about how to work around this problem?
Suppose I have two
DateTimeImmutableobjects, let's say$aand$b, and I want to check whether they are referring to the same point in time.You can't user
$a === $bfor this, because that would always returnfalse. But if you use$a == $b,phpawill complain.Any suggestions about how to work around this problem?