[php-src] Issue #20706: version_compare() comparing 8.5 and 8.5.0 doesn't work
| From: | staabm | Date: | Mon, 15 Dec 2025 08:33:16 +0000 |
| Subject: | [php-src] Issue #20706: version_compare() comparing 8.5 and 8.5.0 doesn't work | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251392@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/20706
Author: staabm
### Description
The following code:
```php
<?php
var_dump(version_compare("8.5.0", "8.5.0", "<="));
var_dump(version_compare("8.5.0", "8.5", "<="));
```
Resulted in this output:
```
bool(true)
bool(false)
```
But I expected this output instead:
```
bool(true)
bool(true)
```
see https://3v4l.org/8UfAW#veol
### PHP Version
```plain
PHP 8.4.15 (cli) (built: Nov 18 2025 17:26:05) (NTS)
Copyright (c) The PHP Group
Built by Homebrew
Zend Engine v4.4.15, Copyright (c) Zend Technologies
```
### Operating System
macOS