Generate random fitting fake data with Faker

Code
<?php

use Faker\Factory;

$faker Factory::create('it_IT');

dump(
    
// name and address from locale
    
$faker->name,
    
$faker->address,
    
$faker->dateTime,
    
// with optional(), it may return null
    
$faker->optional(0.5null)->colorName
);

echo 
sprintf(
    
'<img src="%s">',
    
$faker->imageUrl(320240'animals')
);
Result
"Raniero Piras"

"""
Rotonda Vitali 376\n
San Raniero laziale, 90219 Latina (LU)
"""

DateTime @373336745 {#1492
date: 1981-10-31 01:39:05.0 Europe/Berlin (+01:00)
}

"DarkSlateBlue"