10000 mb_convert_kana does not work on HK combination in PHP8.2.26 · Issue #17141 · php/php-src · GitHub
[go: up one dir, main page]

Skip to content
mb_convert_kana does not work on HK combination in PHP8.2.26 #17141
Closed as not planned
Closed as not planned
@cjayalmontecm

Description

@cjayalmontecm

Description

The code below works fine on older version(PHP 8.1.13, 8.0.30, 7.4.33), but returns Fatal error: Uncaught ValueError: mb_convert_kana(): Argument #2 ($mode) must not combine 'H' and 'K' flags in PHP 8.2.26.

The following code:

<?php
$valueStr = "カタカナ ロマンチ 123";
$valueStr = mb_convert_kana($valueStr, 'rnaKVH', 'UTF-8');
echo $valueStr;

Resulted in this output:

// for PHP 8.1.13, 8.0.30, 7.4.33
カタカナ ロマンチ 123

// for PHP 8.2.26
Fatal error: Uncaught ValueError: mb_convert_kana(): Argument #2 ($mode) must not combine 'H' and 'K' flag

But I expected this output instead:

// for PHP 8.1.13, 8.0.30, 7.4.33
カタカナ ロマンチ 123

// for PHP 8.2.26
カタカナ ロマンチ 123

Online Sandbox Result

image

PHP Version

PHP 8.2.26

Operating System

AlmaLinux8

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

      0