changxiaoming/fill-name

There is no license information available for the latest version (v1.0.0) of this package.

Generate random names , etc. "Cook" "李小红"

v1.0.0 2022-08-06 10:08 UTC

This package is auto-updated.

Last update: 2025-05-06 17:35:12 UTC


README

生成随机姓名,如: "李小红"

使用方法

use changxiaoming\FillName\Genwords;

  • 生成一个随机名字
 $name =  Genwords::getInstance()->getRandName();
  • 生成一个女士名-设置性别
 $name =  Genwords::getInstance()->setGender('female')->getRandName()  ;
  • 随机生成100个姓名
for($i=0;$i<100;$i++){
    echo ( Genwords::getInstance()->getRandName() ) . "  " ;
    if(($i+1) %5 == 0){
        echo "\n";
    }
}