[php-src] Issue #15170: substr_compare() returning values outside -1,0,1 on php 8.2.0+
| From: | nevez | Date: | Tue, 30 Jul 2024 17:02:36 +0000 |
| Subject: | [php-src] Issue #15170: substr_compare() returning values outside -1,0,1 on php 8.2.0+ | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247401@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15170
Author: nevez
### Description
The following code:
```php
<?php
echo
substr_compare(hex2bin("000000cb0000000065adb0000000001f000000060000000100"),hex2bin("00000028"),12,4);
```
Resulted in this output:
```
-9
```
But I expected this output instead:
```
-1
```
### PHP Version
8.2.21
### Operating System
_No response_