[GIT-PULLS] [php-src] PR #22643: Fix leak on double DatePeriod::__construct() call

[email protected] (iluuu1994)
Newsgroups php.git-pulls
Message-ID <gIZOV89CLjzQOalOtVBUUcaIXNS1HjpJYFPjIBx97Ao@main.internal.php.net>
Pull Request: https://github.com/php/php-src/pull/22643
Author: iluuu1994

See https://github.com/php/php-src/actions/runs/28911263674/job/85769105449.

Normally we might want to discuss whether such code is even sensible, but it seems carbon is relying on it, as evidenced by the CI failure above. A minimal carbon example that reproduces the error:

```php
<?php

use Carbon\Carbon;

require __DIR__ . '/vendor/autoload.php';

$day = Carbon::now();
$period = Carbon::now()->toPeriod($day);
```
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.