Score
0
Watch 19 Star 50 Fork 20

空空。 / php-pinyinPHP

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
PHP 汉字转拼音支持多音字 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

##PHP 汉字转拼音

<?php
 /**
 * @package default
 * @copyright php-pinyin.
 * @author 自娱自乐自逍遥 <wapznw@qq.com>
 */

require_once 'PinYin/PinYin.class.php';

print_r(PinYin::toPinyin('重庆是一个很重要的城市'));
print_r(PinYin::toPinyin('重庆是一个很重要的城市', true)); //显示声调

echo join(' ', PinYin::toPinyin('带着希望去旅行,比到达终点更美好')); # dai zhe xi wang qu lv xing , bi dao da zhong dian geng mei hao
echo PHP_EOL;
echo join(' ', PinYin::toPinyin('重庆是一个很重要的城市', true)); # chóng qìng shì yí gè hěn zhòng yào dí chéng shì

Comments ( 2 )

Sign in for post a comment

PHP
1
https://gitee.com/wapznw/php-pinyin.git
git@gitee.com:wapznw/php-pinyin.git
wapznw
php-pinyin
php-pinyin
master

Help Search