1 Star 0 Fork 21

馬利 / php-pinyin

forked from 空空。 / php-pinyin 
Create your Gitee Account
Explore and code with more than 5 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 ( 0 )

Sign in for post a comment

About

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

Releases

No release

Contributors

All

Activities

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

Search