From PHP 8.1, passing null to the DateTime constructor emits a deprecation notice (DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated).
So we should handle the empty $format variable in Date and DateTime classes as suggested.
From PHP 8.1, passing null to the DateTime constructor emits a deprecation notice (DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated). So we should handle the empty $format variable in Date and DateTime classes as suggested.