--TEST-- DateTime/DateTimeImmutable compare handler --FILE-- getMessage(), "\n"; } try { var_dump($MDT < $DT); } catch (\DateObjectError $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } try { var_dump($DTI < $MDT); } catch (\DateObjectError $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } try { var_dump($MDT < $DTI); } catch (\DateObjectError $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- bool(false) DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object