📅  最后修改于: 2022-03-11 14:53:48.655000             🧑  作者: Mango
function convert($string) {
$persian = ['Û°', 'Û±', 'Û²', 'Û³', 'Û´', 'Ûµ', 'Û¶', 'Û·', 'Û¸', 'Û¹'];
$arabic = ['Ù©', 'Ù¨', 'Ù§', 'Ù¦', 'Ù¥', 'Ù¤', 'Ù£', 'Ù¢', 'Ù¡','Ù '];
$num = range(0, 9);
$convertedPersianNums = str_replace($persian, $num, $string);
$englishNumbersOnly = str_replace($arabic, $num, $convertedPersianNums);
return $englishNumbersOnly;
}