PHP code example of longxinhong / wecom

1. Go to this page and download the library: Download longxinhong/wecom library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

longxinhong / wecom example snippets

`
use fengqi\Hanzi\Hanzi;

$chs = '中国人';
$cht = '中國人';

// 简繁体获取拼音
var_dump(Hanzi::pinyin($chs));
var_dump(Hanzi::pinyin($cht));

// 简繁体转换
var_dump(Hanzi::turn($chs));
var_dump(Hanzi::turn($cht, true));