mmarigny / name-generator
基于按国家和性别分类的姓氏和名字列表创建名称
v0.4
2017-01-31 12:57 UTC
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2024-09-23 15:36:01 UTC
README
基于按国家和性别分类的姓氏和名字列表创建名称
基于按国家性别分类的姓氏和名字列表生成随机名称,包中提供了最常见的法国家庭名和姓氏列表
安装
安装 composer: 如何安装 composer
编辑你的 composer.json
- 在 composer.json 中添加 name-generator 依赖
{ "require": { "mmarigny/name-generator": "~0.3" } } ``` 2. Then in the command line : ```composer update``` Usage ----- ```php use Mmarigny\NameGenerator\Generator; $name = $generator->getName(); print_r($name);
输出
Array
(
[firstname] => Laurine
[lastname] => BEL
[gender] => female
[country] => FR
)