- Php
- Features
- Autoload
- Class Reflection
- Magic Methods
- Exceptions
- Late Static Binding
- Type Hinting
- SPL
- PHPUNIT
- PHAR
- Composer
- Guzzle
- Carbon
- Faker ♣
- Math
- Requests
- Design Patterns
- Singleton Pattern
- Observer Pattern
- Strategy Pattern
- Registry
- Symfony
- Routes
- Annotations
- Flex
- Controllers
- Doctrine
- Templating
- Versions
- Php7.4
- Php8.0
- Security
- Filter Input
- Remote Code Injection
- Sql Injection
- Session Fixation
- File Uploads
- Cross Site Scripting
- Spoofed Forms
- CSRF
- Session Hijacking
- Modern Php
- Composer
- Slim Framework
- Autoloader
- Package
- Releases
- Generators
- Dependency Injection
- Middleware
- Create Framework
- App
- Http Foundation
- Front Controller
- Routing
- Render Controller
- Resolver
- SoC
- Frameworks
- Symfony V5
- Laravel V8
- Laminas V3
- Codeigniter V4
Faker
Faker is a PHP library that generates fake data for you.
/**
* 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
* Faker\Generator->$property calls to Faker\Generator->format($property).
*
* composer require fzaninotto/faker
*/
require_once __DIR__ . '/vendor/autoload.php';
$faker = Faker\Factory::create();
echo $faker->name; // Buck Mohr
echo $faker->name; // Eloisa Wuckert
echo $faker->name; // Jessica Keeling
echo $faker->address; // Bertachester, IN 2354406568 Daisha Locks Suite 522
echo $faker->address; // Lake Lolafurt, AZ 55458009 Marvin Dale
echo $faker->address; // Mafaldamouth, VA 92131
echo $faker->country; // Bulgaria
echo $faker->countryCode; // PF
Last update: 61 days ago