[php-src] Issue #18955: strtotime($month) not returning the correct timestamp
| From: | allentcm | Date: | Fri, 27 Jun 2025 05:30:21 +0000 |
| Subject: | [php-src] Issue #18955: strtotime($month) not returning the correct timestamp | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250335@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/18955
Author: allentcm
### Description
The following code:
```php
date('n', strtotime('February')) // run on 27 Jun 2025
date('n', strtotime('February')) // run on 30 May 2025
<?php
```
Resulted in this output:
```
"2"
"3"
```
But I expected this output instead:
```
"2"
"2"
```
https://drive.google.com/file/d/1--9Gvd5jbyfkLE4eHGmddOh4vtBZSfoS/view?usp=sharing
https://drive.google.com/file/d/19N0EMOBLTiAXg7G4qgeKeS8kIFlk-DC1/view?usp=sharing
https://drive.google.com/file/d/1f5NK9bRJwwU1oL7zkkEMrCdeRiAJ7J5q/view?usp=sharing
### PHP Version
```plain
PHP 8.3.19 (cli) (built: Apr 8 2025 03:57:19) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.19, Copyright (c) Zend Technologies
with Zend OPcache v8.3.19, Copyright (c), by Zend Technologies
```
### Operating System
_No response_