use Faker\Factory; $faker = Factory::create(); $name = $faker->name(); echo $name; // John Doe
use Faker\Factory; $faker = Factory::create(); $address = $faker->address(); echo $address; // 123 Main Street, Suite 5, Anytown, USAIn these examples, the Factory class is used to create a new instance of the Faker generator. Then, the generator is used to generate random fake data using the different provided methods. Overall, PHP Faker is a great tool for developers looking for realistic and varied data to use in their applications.