Skip to content

mb_convert_kana is broken in PHP8.2.0 #10174

Closed
@akira345

Description

@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
$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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions