[php-src] Issue #10792: match dosen't support dot in string comparison
| From: | MichaelJouve | Date: | Mon, 06 Mar 2023 10:51:32 +0000 |
| Subject: | [php-src] Issue #10792: match dosen't support dot in string comparison | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243859@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10792
Author: MichaelJouve
### Description
The following code:
```php
$item = 'M.'
return match ($item) {
$item == 'Monsieur' || $item == 'M.' => 'Ms',
$item == 'Madame' || $item == 'Mme' => 'MM',
default => 'Other',
};
<?php
```
Resulted in this output:
```
'Other'
```
But I expected this output instead:
```
I expected that it returns 'MS'
```
### PHP Version
PHP 8.2.2
### Operating System
_No response_