20 Star 54 Fork 20

空空。 / php-pinyin

Create your Gitee Account
Explore and code with more than 6 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.
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

About

PHP 汉字转拼音支持多音字 spread retract
PHP
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
PHP
1
https://git.oschina.net/wapznw/php-pinyin.git
git@git.oschina.net:wapznw/php-pinyin.git
wapznw
php-pinyin
php-pinyin
master

Search

103611 48b8ff67 1899542 103622 4d02230c 1899542