What is the significance of using DateInterval::createFromDateString over new DateInterval in PHP?

Using DateInterval::createFromDateString in PHP is significant because it allows you to create a DateInterval object directly from a human-readable string representation of the interval, such as "1 day" or "2 weeks". This method simplifies the process of creating DateInterval objects without having to manually calculate the number of days, months, years, etc.

// Using DateInterval::createFromDateString to create a DateInterval object
$interval = DateInterval::createFromDateString('1 day');
echo $interval->format('%d days');