分享好友 最新资讯首页 最新资讯分类 切换频道
外卖优惠券小程序源码(吃喝优惠券前后端完整代码开源,真正的6个点消费额推广美团优惠券和饿了么优惠券,支持H5).zip
2024-12-10 13:00
# Faker [![Code Coverage](https://codecov.io/gh/fzaninotto/Faker/branch/master/graph/badge.svg)](https://codecov.io/gh/fzaninotto/Faker) Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you. Faker is heavily inspired by Perl's [Data::Faker](http://search.cpan.org/~jasonk/Data-Faker-0.07/), and by ruby's [Faker](https://rubygems.org/gems/faker). Faker requires PHP >= 5.3.3. [![Monthly Downloads](https://poser.pugx.org/fzaninotto/faker/d/monthly.png)](https://packagist.org/packages/fzaninotto/faker) [![Build Status](https://travis-ci.org/fzaninotto/Faker.svg?branch=master)](https://travis-ci.org/fzaninotto/Faker) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/eceb78a9-38d4-4ad5-8b6b-b52f323e3549/mini.png)](https://insight.sensiolabs.com/projects/eceb78a9-38d4-4ad5-8b6b-b52f323e3549) # Table of Contents - [Installation](#installation) - [Basic Usage](#basic-usage) - [Formatters](#formatters) - [Base](#fakerproviderbase) - [Lorem Ipsum Text](#fakerproviderlorem) - [Person](#fakerprovideren_usperson) - [Address](#fakerprovideren_usaddress) - [Phone Number](#fakerprovideren_usphonenumber) - [Company](#fakerprovideren_uscompany) - [Real Text](#fakerprovideren_ustext) - [Date and Time](#fakerproviderdatetime) - [Internet](#fakerproviderinternet) - [User Agent](#fakerprovideruseragent) - [Payment](#fakerproviderpayment) - [Color](#fakerprovidercolor) - [File](#fakerproviderfile) - [Image](#fakerproviderimage) - [Uuid](#fakerprovideruuid) - [Barcode](#fakerproviderbarcode) - [Miscellaneous](#fakerprovidermiscellaneous) - [Biased](#fakerproviderbiased) - [Html Lorem](#fakerproviderhtmllorem) - [Modifiers](#modifiers) - [Localization](#localization) - [Populating Entities Using an ORM or an ODM](#populating-entities-using-an-orm-or-an-odm) - [Seeding the Generator](#seeding-the-generator) - [Faker Internals: Understanding Providers](#faker-internals-understanding-providers) - [Real Life Usage](#real-life-usage) - [Language specific formatters](#language-specific-formatters) - [Third-Party Libraries Extending/Based On Faker](#third-party-libraries-extendingbased-on-faker) - [License](#license) ## Installation ```sh composer require fzaninotto/faker ``` ## Basic Usage ### Autoloading Faker supports both `PSR-0` as `PSR-4` autoloaders. ```php <?php # When installed via composer require_once 'vendor/autoload.php'; ``` You can also load `Fakers` shipped `PSR-0` autoloader ```php <?php # Load Fakers own autoloader require_once '/path/to/Faker/src/autoload.php'; ``` *alternatively, you can use any another PSR-4 compliant autoloader* ### Create fake data Use `FakerFactory::create()` to create and initialize a faker generator, which can generate data by accessing properties named after the type of data you want. ```php <?php // use the factory to create a FakerGenerator instance $faker = FakerFactory::create(); // generate data by accessing properties echo $faker->name; // 'Lucy Cechtelar'; echo $faker->address; // "426 Jordy Lodge // Cartwrightshire, SC 88120-6700" echo $faker->text; // Dolores sit sint laboriosam dolorem culpa et autem. Beatae nam sunt fugit // et sit et mollitia sed. // Fuga deserunt tempora facere magni omnis. Omnis quia temporibus laudantium // sit minima sint. ``` Even if this example shows a property access, each call to `$faker->name` yields a different (random) result. This is because Faker uses `__get()` magic, and forwards `FakerGenerator->$property` calls to `FakerGenerator->format($property)`. ```php <?php for ($i = 0; $i < 10; $i++) { echo $faker->name, "
最新文章
删了微信好友怎么加回来
在使用微信的过程中,我们可能会因为各种原因不小心删除了某些好友。当意识到这一操作时,很多人会感到懊恼,尤其是对于那些重要
50个小学生百科知识来挑战快问快答!__2
网上科普有关“50个小学生百科知识来挑战快问快答!_”话题很是火热,小编也是针对50个小学生百科知识来挑战快问快答!_寻找了一
中国十大镜片品牌排行榜,mikibobo镜片属于什么档次,极致性价比
选一个好镜片,就像选一个好手机,不但用着好,而且是身份地位的象征。市场有不同规格和价位段的产品。有进口的高端的镜片,有国
五河网站排名优化费用是如何计算的?
五河SEO网站优化提升自然流量的方式有哪些?五河优化长尾关键词,虽然这些关键词无法在短期内给网站带来更多流量,但对网站的长
外贸网站全球推广与SEO国际化策略指南
外贸网站国际化推广与SEO优化全攻略,涵盖多语言、文化适应性、关键词研究、本地化内容策略、链接建设、移动优化等关键步骤。通
seo 关键词排名报价方案分析:费用与网站项目维度规模等有关
SEO关键词排名报价可谓五花八门,很多SEO外包公司都喜欢提供,这也导致了很多甲方客户对SEO行业的普遍印象偏低,那么SEO外包的报
【A3360快速问医生下载】HTC A3360快速问医生12.3.0免费下载
身体不舒服?找快速问医生,随时随地免费问医生~~网上问诊,首选快速问医生APP,累计已服务数千万患者。在线医务工作者实名认证
360网站收录有什么用 360网站收录:提升曝光,助力SEO优化
在当今这个信息爆炸的时代,互联网已成为企业展示自身形象、推广产品与服务、吸引潜在客户的关键舞台而在这一浩瀚的网络海洋中,
小米新专利聚焦数据推荐技术,提升检索模型预测能力
2024年12月12日,金融界报道,北京小米移动软件有限公司申请了一项名为“数据推荐方法、装置、电子设备及存储介质”的专利,公开
2025年度食堂食材【非八大类食材(蔬菜、水产、干货类)】配送服务项目中标结果公示
序号投标供应商名称资格响应文件1深圳市新源农产品供应链有限公司按要求提供《投标人基本情况表》;按要求提供营业执照;按要求
推荐文章