[php-src] Issue #10174: mb_convert_kana is broken in PHP8.2.0

From: Date: Wed, 28 Dec 2022 16:12:03 +0000
Subject: [php-src] Issue #10174: mb_convert_kana is broken in PHP8.2.0
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243266@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10174
Author: akira345

### Description

mb_convert_kana is broken in PHP8.2.0.
The code below works fine in PHP8.1.13, but returns ``Fatal error: Uncaught ValueError:
mb_convert_kana(): Argument #2 ($mode) must not combine 'h' and 'k'
flags`` in PHP8.2.0.

The following code:

```php
<?php
$ret = mb_convert_kana("fooあいうエオ","rnaskh","UTF-8");
print($ret);
```

Resulted in this output:
```
// for PHP8.1.13
fooアイウエオ

// for PHP8.2.0
Fatal error: Uncaught ValueError: mb_convert_kana(): Argument #2 ($mode) must not combine
'h' and 'k' flags
```

But I expected this output instead:
```
// for PHP8.1.13
fooアイウエオ

// for PHP8.2.0
fooアイウエオ
```


### PHP Version

PHP 8.2.0

### Operating System

Debian GNU/Linux 11


Thread (1 message)

  • akira345
« previous php.bugs (#243266) next »