Issue: https://github.com/php/php-src/issues/10479
Author: peresmishnyk
### Description
The following code:
```php
<?php
```
// I am running it on 2023-01-31 and it failed but if local time is set to 2023-02-01 all works as
expected
var_dump(DateTime::createFromFormat('Y-m','2022-02'));
Resulted in this output:
```
```
object(DateTime)#6654 (3) {
["date"]=>
string(26) "2022-**03-03** 16:56:07.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(3) "UTC"
}
But I expected this output instead:
```
```
object(DateTime)#6654 (3) {
["date"]=>
string(26) "2022-**02-28** 16:56:07.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(3) "UTC"
}
### PHP Version
PHP 8.1.14
### Operating System
_No response_