PHP code example of cytsunny / rand-chinese
1. Go to this page and download the library: Download cytsunny/rand-chinese 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/ */
cytsunny / rand-chinese example snippets
use RandChinese\RandChinese;
echo RandChinese::phase(); //沒有數字的話預設生成 20 個中文字
echo '\n';
echo RandChinese::phase(40);//你也可以輸入想要的長度
echo '\n';
echo RandChinese::phase(20, 2000); //後面的數字決定複雜程度,可以是任何小於 4000 的數字