2024新版仿趣闲赚悬赏猫任务兼职源码

   日期:2024-12-27    作者:akxfc888 移动:http://ljhr2012.riyuangf.com/mobile/quote/61709.html
# 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) - [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 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 // require the Faker autoloader require_once '/path/to/Faker/src/autoload.php'; // alternatively, use another PSR-0 compliant autoloader (like the Symfony2 ClassLoader for instance) // 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, "

特别提示:本信息由相关用户自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


举报收藏 0评论 0
0相关评论
相关最新动态
推荐最新动态
点击排行
{
网站首页  |  关于我们  |  联系方式  |  使用协议  |  隐私政策  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2020018471号