Giter VIP home page Giter VIP logo

faker-1's Introduction

Faker

Faker is a PHP port of a Ruby port of Data::Faker from Perl.

It's a convoluted path, but you're the beneficiary of a simple way to generate fake data for your PHP 5.3 project.

Usage is fairly straightforward:

echo \Faker\Name::name();    // "Leeroy Jenkins"

There are a few more to choose from:

\Faker\Address::address();
\Faker\Address::streetName();
\Faker\Address::streetAddress($includeSecondary = false);
\Faker\Address::city();
\Faker\Address::state();
\Faker\Address::stateAbbr();
\Faker\Address::zipCode();
\Faker\Address::zip();
\Faker\Address::postcode();
\Faker\Address::cityStateZip();
\Faker\Address::country();

\Faker\Company::name();
\Faker\Company::suffix();
\Faker\Company::catchPhrase();
\Faker\Company::bs();

\Faker\DateTime::timestamp();
\Faker\DateTime::date($format = null);
\Faker\DateTime::dateFormat();
\Faker\DateTime::time($format = null);
\Faker\DateTime::timeFormat();
\Faker\DateTime::dateTime($format = null);
\Faker\DateTime::dateTimeFormat();
\Faker\DateTime::month();
\Faker\DateTime::monthAbbr();
\Faker\DateTime::weekday();
\Faker\DateTime::weekdayAbbr();

\Faker\Internet::email($name = null);
\Faker\Internet::freeEmail($name = null);
\Faker\Internet::safeEmail($name = null);
\Faker\Internet::userName($name = null);
\Faker\Internet::domainName();
\Faker\Internet::safeDomainName();
\Faker\Internet::domainWord();
\Faker\Internet::domainSuffix();
\Faker\Internet::ipv4Address();
\Faker\Internet::slug($str = null, $glue = array('.', '-', '_'));

\Faker\Lorem::word();
\Faker\Lorem::words($num = 3);
\Faker\Lorem::sentence($wordCount = 4);
\Faker\Lorem::sentences($sentenceCount = 3);
\Faker\Lorem::paragraph($sentenceCount = 3);
\Faker\Lorem::paragraphs($paragraphCount = 3);

\Faker\Name::name();
\Faker\Name::firstName();
\Faker\Name::lastName();
\Faker\Name::prefix();
\Faker\Name::suffix();

\Faker\PhoneNumber::phoneNumber();
\Faker\PhoneNumber::safePhoneNumber();

Yeah,

... it's an entire library made up of static methods. Just to bug Bulat :)

faker-1's People

Contributors

bobthecow avatar jjbohn avatar cranberyxl avatar

Stargazers

Bill Ortell avatar

Watchers

Bill Ortell avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.