What potential issues can arise when using method chaining in PHP, especially with DateTime::modify?

Potential issues that can arise when using method chaining in PHP, especially with DateTime::modify, include unexpected results due to the order in which methods are executed. To solve this, it is important to ensure that the methods are chained in the correct order to achieve the desired outcome.

$date = new DateTime();
$date->modify('+1 day')->modify('+1 month');