PHP code example of breda / faker-provider-english-words
1. Go to this page and download the library: Download breda/faker-provider-english-words library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
breda / faker-provider-english-words example snippets
// Assuming everything is auto-loaded
// Create faker
$faker = Faker\Factory::create();
// Just make sure the default Lorem provider is not added after this.
$faker->addProvider(new BReda\Faker\Provider\EnglishWords($faker));
// Create faker
$faker = Faker\Factory::create();
foreach(range(0, 2000) as $i) {
echo $faker->unique()->word;
}
// Create faker
$faker = Faker\Factory::create();
$faker->addProvider(new BReda\Faker\Provider\EnglishWords($faker));
foreach(range(0, 200000) as $i) {
echo $faker->unique()->word;
}