What potential performance issues can arise when using DateTimeZone::getTransitions in PHP 7?

When using DateTimeZone::getTransitions in PHP 7, potential performance issues can arise due to the method retrieving all transitions for the timezone, which can be resource-intensive for timezones with many transitions. To solve this issue, you can limit the number of transitions retrieved by specifying a start and end timestamp range.

$timezone = new DateTimeZone('America/New_York');
$transitions = $timezone->getTransitions(strtotime('now - 1 year'), strtotime('now + 1 year'));

foreach ($transitions as $transition) {
    // Process each transition
}