bug71635.phpt 282 B

1234567891011
  1. --TEST--
  2. Bug #71635 (segfault in DatePeriod::getEndDate() when no end date has been set)
  3. --FILE--
  4. <?php
  5. date_default_timezone_set('UTC');
  6. $period = new DatePeriod(new DateTimeImmutable("now"), new DateInterval("P2Y4DT6H8M"), 2);
  7. var_dump($period->getEndDate());
  8. ?>
  9. --EXPECT--
  10. NULL